Skip to content

Commit

Permalink
Update index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
danilowoz committed Feb 22, 2023
1 parent e234457 commit 03a0079
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions sandpack-client/src/clients/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type {
ShellProcess,
FSWatchEvent,
} from "@codesandbox/nodebox";
import type { ShellCommandOptions } from "@codesandbox/nodebox/build/modules/shell";

import type {
ClientOptions,
Expand Down Expand Up @@ -37,7 +38,7 @@ export class SandpackNode extends SandpackClient {
private emulatorIframe!: HTMLIFrameElement;
private emulator!: Nodebox;
private emulatorShellProcess: ShellProcess | undefined;
private emulatorCommand: [string, string[]] | undefined;
private emulatorCommand: [string, string[], ShellCommandOptions] | undefined;
private iframePreviewUrl: string | undefined;
private _modulesCache = new Map();

Expand Down Expand Up @@ -136,9 +137,10 @@ export class SandpackNode extends SandpackClient {
type: "shell/progress",
data: {
...data,
command: this.emulatorCommand
?.map((e) => (Array.isArray(e) ? e.join(" ") : e))
.join(" "),
command: [
this.emulatorCommand?.[0],
this.emulatorCommand?.[1].join(" "),
].join(" "),
},
});

Expand Down

0 comments on commit 03a0079

Please sign in to comment.