Skip to content

Commit

Permalink
Exec with explicit shell
Browse files Browse the repository at this point in the history
This makes it possible to use it on mounts with the noexec option.
  • Loading branch information
Julian Vassev committed Jul 1, 2020
1 parent 6da86e2 commit e8ab329
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ export class RotatingFileStream extends Writable {
this.findName(true, (error: Error, found: string): void => {
if(error) return callback(error);

this.fsOpen(found, "w", parseInt("777", 8), (error: Error, fd: number): void => {
this.fsOpen(found, "w", 0o777, (error: Error, fd: number): void => {
if(error) return callback(error);

const unlink = (error: Error): void => {
Expand All @@ -544,7 +544,7 @@ export class RotatingFileStream extends Writable {

if(found.indexOf(sep) === -1) found = `.${sep}${found}`;

this.exec(found, unlink);
this.exec(`sh "${found}"`, unlink);
});
});
});
Expand Down

0 comments on commit e8ab329

Please sign in to comment.