Skip to content

Commit

Permalink
Fix escaping of arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
mohd-akram committed Feb 23, 2025
1 parent 367d1d5 commit 054212b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
dist
allure-commandline.tgz
allure-report

#IDEA Files
.idea/*
Expand Down
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env node
var path = require('path');
var isWindows = path.sep === '\\';
var allureCommand = 'allure' + (isWindows ? '.bat' : '');

/**
*
* @param {string[]} args
*/
module.exports = function(args) {
return require('child_process').spawn(path.join(__dirname, 'dist/bin', allureCommand), args, {
return require('batspawn').spawn(path.join(__dirname, 'dist/bin', 'allure'), '.bat', args, {
env: process.env,
stdio: 'inherit',
shell: true,
});
}
16 changes: 12 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
"index.js"
],
"scripts": {
"test": "node ./bin/allure --version"
"test": "node ./bin/allure generate -c --single-file --name \"Web & Mobile\""
},
"repository": "https://github.com/allure-framework/allure-npm.git",
"license": "Apache-2.0",
"devDependencies": {}
"dependencies": {
"batspawn": "^1.0.1"
}
}

0 comments on commit 054212b

Please sign in to comment.