Skip to content

Commit

Permalink
fix: use root-tools in pwsh
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Aug 8, 2022
1 parent 577f9c5 commit afa59a4
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dist/setup_cpp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/setup_cpp.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/setup_cpp.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/setup_cpp.mjs.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/powershell/powershell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { isArch } from "../utils/env/isArch"
import { hasDnf } from "../utils/env/hasDnf"
import { setupDnfPack } from "../utils/setup/setupDnfPack"
import { isUbuntu } from "../utils/env/isUbuntu"
import { execSudo } from "../utils/exec/sudo"
import { execRootSync } from "root-tools"

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export async function setupPowershell(version: string | undefined, _setupDir: string, _arch: string) {
Expand All @@ -26,7 +26,7 @@ export async function setupPowershell(version: string | undefined, _setupDir: st
return setupPacmanPack("powershell-bin", version, "yay")
} else if (hasDnf()) {
setupDnfPack("curl")
execSudo("/bin/bash", [
execRootSync("/bin/bash", [
"-c",
`curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo`,
])
Expand All @@ -36,7 +36,7 @@ export async function setupPowershell(version: string | undefined, _setupDir: st
"microsoft.asc",
"https://packages.microsoft.com/keys/microsoft.asc"
)
execSudo("/bin/bash", [
execRootSync("/bin/bash", [
"-c",
`echo "deb [arch=amd64 signed-by=${keyFileName}] https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main" > /etc/apt/sources.list.d/microsoft.list`,
])
Expand Down

0 comments on commit afa59a4

Please sign in to comment.