Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
PUBLIC
/
surfer-okd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 38932f15
authored
5 years ago
by
Girish Ramakrishnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add https:// to --server if required
1 parent
f14ea69e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
cli/actions.js
cli/actions.js
View file @
38932f1
...
...
@@ -29,12 +29,19 @@ function checkConfig(options) {
process
.
exit
(
1
);
}
if
(
options
.
parent
.
server
)
{
var
tmp
=
url
.
parse
(
options
.
parent
.
server
);
if
(
!
tmp
.
slashes
)
tmp
=
url
.
parse
(
'https://'
+
options
.
parent
.
server
);
gServer
=
tmp
.
protocol
+
'//'
+
tmp
.
host
;
}
else
{
gServer
=
config
.
server
();
}
if
(
!
options
.
parent
.
token
&&
!
config
.
accessToken
())
{
console
.
log
(
'Run %s first or provide %s'
,
'surfer login'
.
bold
,
'--token <access token>'
.
bold
);
process
.
exit
(
1
);
}
gServer
=
options
.
parent
.
server
||
config
.
server
();
gQuery
=
{
access_token
:
options
.
parent
.
token
||
config
.
accessToken
()
};
console
.
error
(
'Using server %s'
,
gServer
.
cyan
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment