Skip to content

Commit

Permalink
feat(#93): fix indents
Browse files Browse the repository at this point in the history
  • Loading branch information
volodya-lombrozo committed Dec 1, 2022
1 parent 52f69d4 commit 02e31f7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 deletions.
62 changes: 31 additions & 31 deletions src/mvnw.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,37 +43,37 @@ function shell() {
*/
module.exports = function(args) {
return new Promise((resolve, reject) => {
const home = path.resolve(__dirname, '../mvnw');
const bin = path.resolve(home, 'mvnw') + (process.platform == 'win32' ? '.cmd' : '');
const params = args.filter(function(t) {
return t != '';
}).concat([
'--errors',
'--batch-mode',
'--update-snapshots',
'--fail-fast',
]);
const cmd = bin + ' ' + params.join(' ');
console.debug('+ %s', cmd);
const result = spawn(
bin,
process.platform == 'win32' ? params.map((p) => `"${p}"`) : params,
{
cwd: home,
stdio: 'inherit',
shell: shell(),
}
);
const target = params.find((element) => element.includes('targetDir'));
if (target != undefined) {
status.start(args[0], target.split('=')[1]);
const home = path.resolve(__dirname, '../mvnw');
const bin = path.resolve(home, 'mvnw') + (process.platform == 'win32' ? '.cmd' : '');
const params = args.filter(function(t) {
return t != '';
}).concat([
'--errors',
'--batch-mode',
'--update-snapshots',
'--fail-fast',
]);
const cmd = bin + ' ' + params.join(' ');
console.debug('+ %s', cmd);
const result = spawn(
bin,
process.platform == 'win32' ? params.map((p) => `"${p}"`) : params,
{
cwd: home,
stdio: 'inherit',
shell: shell(),
}
result.on('close', (code) => {
if (code !== 0) {
throw new Error('The command "' + cmd + '" exited with #' + code + ' code');
}
status.stop();
resolve(args);
});
);
const target = params.find((element) => element.includes('targetDir'));
if (target != undefined) {
status.start(args[0], target.split('=')[1]);
}
result.on('close', (code) => {
if (code !== 0) {
throw new Error('The command "' + cmd + '" exited with #' + code + ' code');
}
status.stop();
resolve(args);
});
});
};
4 changes: 2 additions & 2 deletions src/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const fs = require('fs');
const readline = require('readline');

module.exports = {
start: start,
stop: stop,
start: start,
stop: stop,
};

let running = false;
Expand Down

0 comments on commit 02e31f7

Please sign in to comment.