mirror of
https://github.com/kovetskiy/mark.git
synced 2026-05-03 05:42:35 +00:00
Do not require password and url when compileonly (#193)
This commit is contained in:
7
auth.go
7
auth.go
@@ -36,11 +36,14 @@ func GetCredentials(
|
|||||||
if password == "" {
|
if password == "" {
|
||||||
password = config.Password
|
password = config.Password
|
||||||
if password == "" {
|
if password == "" {
|
||||||
|
if ! flags.CompileOnly {
|
||||||
return nil, errors.New(
|
return nil, errors.New(
|
||||||
"Confluence password should be specified using -p " +
|
"Confluence password should be specified using -p " +
|
||||||
"flag or be stored in configuration file",
|
"flag or be stored in configuration file",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
password = "none"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if password == "-" {
|
if password == "-" {
|
||||||
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user