Skip to content

Commit

Permalink
fix(start): FuncBinary path with space in user home directories (#621)
Browse files Browse the repository at this point in the history
  • Loading branch information
rupareddy5-21 committed Dec 20, 2022
1 parent 02fdb90 commit affe1a5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/cli/commands/start.ts
Expand Up @@ -35,11 +35,7 @@ export default function registerCommand(program: Command) {
.option("-a, --app-location <path>", "the folder containing the source code of the front-end application", DEFAULT_CONFIG.appLocation)
.option("-i, --api-location <path>", "the folder containing the source code of the API application", DEFAULT_CONFIG.apiLocation)
.option("-O, --output-location <path>", "the folder containing the built source of the front-end application", DEFAULT_CONFIG.outputLocation)
.option(
"-D, --app-devserver-url <url>",
"connect to the app dev server at this URL instead of using output location",
DEFAULT_CONFIG.appDevserverUrl
)
.option("-D, --app-devserver-url <url>", "connect to the app dev server at this URL instead of using output location", DEFAULT_CONFIG.appDevserverUrl)
.option("-is, --api-devserver-url <url>", "connect to the api server at this URL instead of using api location", DEFAULT_CONFIG.apiDevserverUrl)
.option<number>("-j, --api-port <apiPort>", "the API server port passed to `func start`", parsePort, DEFAULT_CONFIG.apiPort)
.option("-q, --host <host>", "the host address to use for the CLI dev server", DEFAULT_CONFIG.host)
Expand Down Expand Up @@ -267,7 +263,7 @@ export async function start(options: SWACLIConfig) {

// serve the api if and only if the user provides a folder via the --api-location flag
if (isApiLocationExistsOnDisk) {
serveApiCommand = `cd "${userWorkflowConfig.apiLocation}" && ${funcBinary} start --cors "*" --port ${apiPort} ${funcArgs ?? ""}`;
serveApiCommand = `cd "${userWorkflowConfig.apiLocation}" && "${funcBinary}" start --cors "*" --port ${apiPort} ${funcArgs ?? ""}`;
}
}
}
Expand Down

0 comments on commit affe1a5

Please sign in to comment.