Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
disjukr committed Dec 12, 2023
1 parent 90cf6ba commit 7623efc
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions cli/pollapo/pollapoYml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,20 +343,15 @@ export const downloadZipAndYmlWithGit: DownloadZipAndYmlFn = async (
const git = await which("git");
if (!git) throw new Error("git not found");
const cwd = await Deno.makeTempDir();
await new Deno.Command(git, { cwd, args: ["init"] }).output();
await new Deno.Command(git, {
await Deno.run({ cwd, cmd: [git, "init"] }).status();
await Deno.run({ cwd, cmd: [git, "remote", "add", "origin", repoUrl] })
.status();
await Deno.run({ cwd, cmd: [git, "fetch", "origin", rev, "--depth=1"] })
.status();
await Deno.run({
cwd,
args: ["remote", "add", "origin", repoUrl],
})
.output();
await new Deno.Command(git, {
cwd,
args: ["fetch", "origin", rev, "--depth=1"],
})
.output();
await new Deno.Command(git, {
cwd,
args: [
cmd: [
git,
"archive",
"--format=zip",
rev,
Expand All @@ -366,12 +361,9 @@ export const downloadZipAndYmlWithGit: DownloadZipAndYmlFn = async (
zipPath,
],
})
.output();
await new Deno.Command(git, {
cwd,
args: ["checkout", rev, "--", "pollapo.yml"],
})
.output();
.status();
await Deno.run({ cwd, cmd: [git, "checkout", rev, "--", "pollapo.yml"] })
.status();
try {
const pollapoYmlText = await Deno.readTextFile(
path.resolve(cwd, "pollapo.yml"),
Expand Down

0 comments on commit 7623efc

Please sign in to comment.