Skip to content

Commit

Permalink
fix: undefined options in spawn and exec methods
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-oles committed Feb 24, 2021
1 parent fa55f42 commit fc5504f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ const defaultLogger: Logger = {
},
};

export { Logger, defaultLogger }
export { Logger, defaultLogger };
4 changes: 2 additions & 2 deletions src/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ async function createSandbox(logger: Logger = defaultLogger): Promise<Sandbox> {
options
);
},
exec: (command: string, options: CommandOptions & RetryOptions) =>
exec: (command: string, options: CommandOptions & RetryOptions = {}) =>
retry(
() =>
new Promise<string>((resolve, reject) => {
Expand Down Expand Up @@ -257,7 +257,7 @@ async function createSandbox(logger: Logger = defaultLogger): Promise<Sandbox> {
logger,
options
),
spawn: (command: string, options: CommandOptions) => {
spawn: (command: string, options: CommandOptions = {}) => {
logger.log(`Spawning "${command}" command...`);

const env = options.env || {};
Expand Down

0 comments on commit fc5504f

Please sign in to comment.