mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-02-24 15:43:08 +08:00
Build broke on Windows (#920)
This commit is contained in:
parent
512aa7d4b3
commit
bb6aecc9ad
1 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@ import (
|
||||||
var checkPS sync.Once
|
var checkPS sync.Once
|
||||||
var psAvailible = false
|
var psAvailible = false
|
||||||
|
|
||||||
func (c *adProvider) getRecords(domainname string) ([]byte, error) {
|
func (c *activedirProvider) getRecords(domainname string) ([]byte, error) {
|
||||||
|
|
||||||
// If we are using PowerShell, make sure it is enabled
|
// If we are using PowerShell, make sure it is enabled
|
||||||
// and then run the PS1 command to generate the adzonedump file.
|
// and then run the PS1 command to generate the adzonedump file.
|
||||||
|
@ -41,7 +41,7 @@ func (c *adProvider) getRecords(domainname string) ([]byte, error) {
|
||||||
return c.readZoneDump(domainname)
|
return c.readZoneDump(domainname)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *adProvider) isPowerShellReady() bool {
|
func (c *activedirProvider) isPowerShellReady() bool {
|
||||||
query, _ := c.powerShellExec(`(Get-Module -ListAvailable DnsServer) -ne $null`, true)
|
query, _ := c.powerShellExec(`(Get-Module -ListAvailable DnsServer) -ne $null`, true)
|
||||||
q, err := strconv.ParseBool(strings.TrimSpace(string(query)))
|
q, err := strconv.ParseBool(strings.TrimSpace(string(query)))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -50,7 +50,7 @@ func (c *adProvider) isPowerShellReady() bool {
|
||||||
return q
|
return q
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *adProvider) powerShellDoCommand(command string, shouldLog bool) error {
|
func (c *activedirProvider) powerShellDoCommand(command string, shouldLog bool) error {
|
||||||
if c.fake {
|
if c.fake {
|
||||||
// If fake, just record the command.
|
// If fake, just record the command.
|
||||||
return c.powerShellRecord(command)
|
return c.powerShellRecord(command)
|
||||||
|
@ -59,7 +59,7 @@ func (c *adProvider) powerShellDoCommand(command string, shouldLog bool) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *adProvider) powerShellExec(command string, shouldLog bool) ([]byte, error) {
|
func (c *activedirProvider) powerShellExec(command string, shouldLog bool) ([]byte, error) {
|
||||||
// log it.
|
// log it.
|
||||||
err := c.logCommand(command)
|
err := c.logCommand(command)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue