Skip to content

Commit

Permalink
Add double quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
snehapar9 committed Oct 13, 2023
1 parent 6f4da9e commit 2a212bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4927,7 +4927,7 @@ var ContainerAppHelper = /** @class */ (function () {
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
command = "az provider show -n Microsoft.App --query resourceTypes[?resourceType=='containerApps'].locations[] | [0]";
command = "az provider show -n Microsoft.App --query \"resourceTypes[?resourceType=='containerApps'].locations[] | [0]\"";
return [4 /*yield*/, util.executeAndThrowIfError(command)];
case 2:
executionResult = _a.sent();
Expand Down Expand Up @@ -5258,7 +5258,7 @@ var ContainerAppHelper = /** @class */ (function () {
}
else {
tgzSuffix = os.platform() == 'darwin' ? 'macos' : 'linux';
command = "(curl -sSL https://github.com/buildpacks/pack/releases/download/v0.27.0/pack-v0.27.0-" + tgzSuffix + ".tgz | " +
command = "(curl -sSL \"https://github.com/buildpacks/pack/releases/download/v0.27.0/pack-v0.27.0-" + tgzSuffix + ".tgz\" | " +
'tar -C /usr/local/bin/ --no-same-owner -xzv pack)';
commandLine = 'bash';
}
Expand Down
6 changes: 3 additions & 3 deletions src/ContainerAppHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export class ContainerAppHelper {
public async getDefaultContainerAppLocation(): Promise<string> {
toolHelper.writeDebug(`Attempting to get the default location for the Container App service for the subscription.`);
try {
let command = `az provider show -n Microsoft.App --query resourceTypes[?resourceType=='containerApps'].locations[] | [0]`
let command = `az provider show -n Microsoft.App --query "resourceTypes[?resourceType=='containerApps'].locations[] | [0]"`
let executionResult = await util.executeAndThrowIfError(command);
// If successful, strip out double quotes, spaces and parentheses from the first location returned
return executionResult.exitCode === 0 ? executionResult.stdout.toLowerCase().replace(/["() ]/g, "").trim() : `eastus2`;
Expand Down Expand Up @@ -361,7 +361,7 @@ export class ContainerAppHelper {
toolHelper.writeDebug('Attempting to determine the runtime stack needed for the provided application source');
try {
// Use 'oryx dockerfile' command to determine the runtime stack to use and write it to a temp file
let command = `docker run --rm -v ${appSourcePath}:/app ${ORYX_CLI_IMAGE} /bin/bash -c \"oryx dockerfile /app | head -n 1 | sed 's/ARG RUNTIME=//' >> /app/oryx-runtime.txt\"`
let command = `docker run --rm -v ${appSourcePath}:/app ${ORYX_CLI_IMAGE} /bin/bash -c "oryx dockerfile /app | head -n 1 | sed 's/ARG RUNTIME=//' >> /app/oryx-runtime.txt"`
await util.executeAndThrowIfError(command)

// Read the temp file to get the runtime stack into a variable
Expand Down Expand Up @@ -421,7 +421,7 @@ export class ContainerAppHelper {
commandLine = 'pwsh';
} else {
let tgzSuffix = os.platform() == 'darwin' ? 'macos' : 'linux';
command = `(curl -sSL https://github.com/buildpacks/pack/releases/download/v0.27.0/pack-v0.27.0-${tgzSuffix}.tgz | ` +
command = `(curl -sSL "https://github.com/buildpacks/pack/releases/download/v0.27.0/pack-v0.27.0-${tgzSuffix}.tgz" | ` +
'tar -C /usr/local/bin/ --no-same-owner -xzv pack)';
commandLine = 'bash';
}
Expand Down

0 comments on commit 2a212bc

Please sign in to comment.