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
15
auth.go
15
auth.go
@ -36,10 +36,13 @@ func GetCredentials(
|
|||||||
if password == "" {
|
if password == "" {
|
||||||
password = config.Password
|
password = config.Password
|
||||||
if password == "" {
|
if password == "" {
|
||||||
return nil, errors.New(
|
if ! flags.CompileOnly {
|
||||||
"Confluence password should be specified using -p " +
|
return nil, errors.New(
|
||||||
"flag or be stored in configuration file",
|
"Confluence password should be specified using -p " +
|
||||||
)
|
"flag or be stored in configuration file",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
password = "none"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,6 +58,10 @@ func GetCredentials(
|
|||||||
password = string(stdin)
|
password = string(stdin)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if flags.CompileOnly && targetURL == "" {
|
||||||
|
targetURL = "http://localhost"
|
||||||
|
}
|
||||||
|
|
||||||
url, err := url.Parse(targetURL)
|
url, err := url.Parse(targetURL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, karma.Format(
|
return nil, karma.Format(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user