mirror of
https://github.com/kovetskiy/mark.git
synced 2025-04-24 05:42:40 +08:00
Do not require password and url when compileonly (#193)
This commit is contained in:
parent
abfd01cc74
commit
c70eb550fe
7
auth.go
7
auth.go
@ -36,11 +36,14 @@ func GetCredentials(
|
||||
if password == "" {
|
||||
password = config.Password
|
||||
if password == "" {
|
||||
if ! flags.CompileOnly {
|
||||
return nil, errors.New(
|
||||
"Confluence password should be specified using -p " +
|
||||
"flag or be stored in configuration file",
|
||||
)
|
||||
}
|
||||
password = "none"
|
||||
}
|
||||
}
|
||||
|
||||
if password == "-" {
|
||||
@ -55,6 +58,10 @@ func GetCredentials(
|
||||
password = string(stdin)
|
||||
}
|
||||
|
||||
if flags.CompileOnly && targetURL == "" {
|
||||
targetURL = "http://localhost"
|
||||
}
|
||||
|
||||
url, err := url.Parse(targetURL)
|
||||
if err != nil {
|
||||
return nil, karma.Format(
|
||||
|
Loading…
x
Reference in New Issue
Block a user