Skip to content

Commit

Permalink
Merge pull request #3 from piotr-oles/fix/undefined-options
Browse files Browse the repository at this point in the history
fix: undefined options in spawn and exec methods
  • Loading branch information
piotr-oles authored Feb 24, 2021
2 parents c03f789 + fc5504f commit f08231e
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 f08231e

Please sign in to comment.