Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
surfer-okd
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PUBLIC
surfer-okd
Commits
1c20715d
Commit
1c20715d
authored
Nov 28, 2015
by
Girish Ramakrishnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix path resolution
parent
755569a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
actions.js
cli/actions.js
+9
-1
No files found.
cli/actions.js
View file @
1c20715d
...
...
@@ -93,7 +93,15 @@ function put(filePath, otherFilePaths, options) {
var
files
=
collectFiles
([
filePath
].
concat
(
otherFilePaths
));
async
.
eachSeries
(
files
,
function
(
file
,
callback
)
{
var
relativeFilePath
=
path
.
resolve
(
file
).
slice
(
process
.
cwd
().
length
+
1
);
var
relativeFilePath
;
if
(
path
.
isAbsolute
(
file
))
{
relativeFilePath
=
path
.
basename
(
file
);
}
else
if
(
path
.
resolve
(
file
).
indexOf
(
process
.
cwd
().
length
)
===
0
)
{
// relative to current dir
relativeFilePath
=
path
.
resolve
(
file
).
slice
(
process
.
cwd
().
length
+
1
);
}
else
{
// relative but somewhere else
relativeFilePath
=
path
.
basename
(
file
);
}
var
destinationPath
=
(
options
.
destination
?
'/'
+
options
.
destination
:
''
)
+
'/'
+
relativeFilePath
;
console
.
log
(
'Uploading file %s -> %s'
,
relativeFilePath
.
cyan
,
destinationPath
.
cyan
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment