Skip to content

Commit

Permalink
fix for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
magurotuna committed Oct 25, 2024
1 parent 33fe0d6 commit b115bd2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/upgrade_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Deno.test("upgrade", async () => {
const tempDir = await Deno.makeTempDir();
console.log(tempDir);

const exe = Deno.build.os === "windows" ? "deployctl.cmd" : "deployctl";

// Install the current `deployctl.ts`
{
const installCmd = await new Deno.Command(Deno.execPath(), {
Expand All @@ -34,7 +36,7 @@ Deno.test("upgrade", async () => {

// Check the version of the installed `deployctl`
{
const versionCmd = await new Deno.Command(`${tempDir}/bin/deployctl`, {
const versionCmd = await new Deno.Command(`${tempDir}/bin/${exe}`, {
args: ["--version"],
}).output();
const stdout = decoder.decode(versionCmd.stdout).trim();
Expand All @@ -51,7 +53,7 @@ Deno.test("upgrade", async () => {

// "Upgrade" the installed `deployctl` to 1.12.0
{
const upgradeCmd = await new Deno.Command(`${tempDir}/bin/deployctl`, {
const upgradeCmd = await new Deno.Command(`${tempDir}/bin/${exe}`, {
args: [
"upgrade",
"--root",
Expand All @@ -66,7 +68,7 @@ Deno.test("upgrade", async () => {

// Check the version of the "upgraded" `deployctl`
{
const versionCmd = await new Deno.Command(`${tempDir}/bin/deployctl`, {
const versionCmd = await new Deno.Command(`${tempDir}/bin/${exe}`, {
args: ["--version"],
}).output();
const stdout = decoder.decode(versionCmd.stdout).trim();
Expand Down

0 comments on commit b115bd2

Please sign in to comment.