From ce5fd538222f5830ba2af59a7047d3f5533f696e Mon Sep 17 00:00:00 2001 From: Andrew Shirley Date: Sun, 7 Jan 2018 01:57:50 +0000 Subject: [PATCH 1/2] convert windows paths to posix when passing to tar Due to https://github.com/mafintosh/tar-stream/issues/3, the tar module needs posix style paths but system-specific paths are being supplied Change-Type: patch --- lib/utils/docker.coffee | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/utils/docker.coffee b/lib/utils/docker.coffee index b22368c81e..cab9280c00 100644 --- a/lib/utils/docker.coffee +++ b/lib/utils/docker.coffee @@ -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 @@ -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 @@ -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) @@ -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'), '/') From 107a90395c36da8065205e1265684a00a52b1873 Mon Sep 17 00:00:00 2001 From: "resin-io-versionbot[bot]" Date: Tue, 9 Jan 2018 14:03:45 +0000 Subject: [PATCH 2/2] v6.12.2 --- CHANGELOG.md | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f2f15b739..0e70634dc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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] diff --git a/package.json b/package.json index dd5e79cf15..e76b277060 100644 --- a/package.json +++ b/package.json @@ -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",