Skip to content

Commit

Permalink
Auto-merge for PR #751 via VersionBot
Browse files Browse the repository at this point in the history
Convert windows paths to posix when passing to tar
  • Loading branch information
resin-io-versionbot[bot] authored Jan 9, 2018
2 parents 810ca78 + 107a903 commit 158d471
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
This project adheres to [Semantic Versioning](http://semver.org/).

## v6.12.2 - 2018-01-09

* Convert windows paths to posix when passing to tar #748 [Andrew Shirley]

## v6.12.1 - 2018-01-02

* Fix deprecation warning for os configure, when passing a bare UUID #744 [Tim Perry]
Expand Down
10 changes: 7 additions & 3 deletions lib/utils/docker.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ exports.tarDirectory = tarDirectory = (dir) ->
relPath = path.relative(path.resolve(dir), file)
Promise.join relPath, fs.stat(file), fs.readFile(file),
(filename, stats, data) ->
pack.entryAsync({ name: filename, size: stats.size, mode: stats.mode }, data)
pack.entryAsync({ name: toPosixPath(filename), size: stats.size, mode: stats.mode }, data)
.then ->
pack.finalize()
return pack
Expand Down Expand Up @@ -258,7 +258,7 @@ exports.runBuild = (params, options, getBundleInfo, logger) ->
# if we need emulation
if options.emulated and platformNeedsQemu()
return transpose.transposeTarStream buildStream,
hostQemuPath: qemuPath
hostQemuPath: toPosixPath(qemuPath)
containerQemuPath: "/tmp/#{QEMU_BIN_NAME}"
else
return buildStream
Expand All @@ -274,7 +274,7 @@ exports.runBuild = (params, options, getBundleInfo, logger) ->

if options.emulated and platformNeedsQemu()
buildThroughStream = transpose.getBuildThroughStream
hostQemuPath: qemuPath
hostQemuPath: toPosixPath(qemuPath)
containerQemuPath: "/tmp/#{QEMU_BIN_NAME}"

newStream = stream.pipe(buildThroughStream)
Expand Down Expand Up @@ -418,3 +418,7 @@ copyQemu = (context) ->
.then ->
fs.chmod(binPath, '755')
.return(binPath)

toPosixPath = (systemPath) ->
path = require('path')
systemPath.replace(new RegExp('\\' + path.sep, 'g'), '/')
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "resin-cli",
"version": "6.12.1",
"version": "6.12.2",
"description": "The official resin.io CLI tool",
"main": "./build/actions/index.js",
"homepage": "https://github.com/resin-io/resin-cli",
Expand Down

0 comments on commit 158d471

Please sign in to comment.