Skip to content

Commit

Permalink
Fix main command log args duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
jkcdarunday committed Nov 20, 2024
1 parent 4e37db2 commit 57c7013
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/sidecar.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ module.exports = (ipc) => async function sidecar (cmd) {
print('\n========================= INIT ===================================\n')

const logArgs = ['--log']
for (const [i, arg] of Bare.argv.entries()) {
const commandIndex = Bare.argv.indexOf('sidecar')
for (const [i, arg] of Bare.argv.slice(commandIndex + 1).entries()) {
if (arg.startsWith('--log-')) {
if (arg === '--log-stacks' || arg.includes('=')) logArgs.push(arg)
else if (i + 1 < Bare.argv.length) logArgs.push(arg, Bare.argv[i + 1])
Expand Down

0 comments on commit 57c7013

Please sign in to comment.