Skip to content

Commit

Permalink
fix: normalise to posix path
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardobridge committed Jan 17, 2024
1 parent eab1682 commit 428f590
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/artillery/lib/platform/aws-ecs/legacy/bom.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ const Table = require('cli-table3');

// NOTE: Code below presumes that all paths are absolute

function _normaliseToPosixPath(p) {
return p.split(path.sep).join(path.posix.sep);
}

function createBOM(absoluteScriptPath, extraFiles, opts, callback) {
A.waterfall(
[
Expand Down Expand Up @@ -73,6 +77,7 @@ function createBOM(absoluteScriptPath, extraFiles, opts, callback) {
prefix = commonPrefix(context.localFilePaths);
}

prefix = _normaliseToPosixPath(prefix);
console.log('prefix', prefix);

//
Expand Down Expand Up @@ -103,7 +108,10 @@ function createBOM(absoluteScriptPath, extraFiles, opts, callback) {
});

const files = context.localFilePaths.map((p) => {
return { orig: p, noPrefix: p.substring(prefix.length, p.length) };
return {
orig: _normaliseToPosixPath(p),
noPrefix: _normaliseToPosixPath(p).substring(prefix.length, p.length)
};
});

console.log('files');
Expand Down

0 comments on commit 428f590

Please sign in to comment.