mirror of https://github.com/aminya/setup-cpp
fix: disable sourcing the profile in addPathSystem
This commit is contained in:
parent
8e542b0dc8
commit
fe9414c998
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -5,6 +5,7 @@ import execa from "execa"
|
||||||
import { isGitHubCI } from "../env/isci"
|
import { isGitHubCI } from "../env/isci"
|
||||||
import untildify from "untildify"
|
import untildify from "untildify"
|
||||||
import { appendFileSync } from "fs"
|
import { appendFileSync } from "fs"
|
||||||
|
// import { spawnSync } from "child_process"
|
||||||
|
|
||||||
/** An add path function that works locally or inside GitHub Actions */
|
/** An add path function that works locally or inside GitHub Actions */
|
||||||
export function addPath(path: string) {
|
export function addPath(path: string) {
|
||||||
|
@ -35,7 +36,7 @@ function addPathSystem(path: string) {
|
||||||
case "darwin": {
|
case "darwin": {
|
||||||
const profile_path = untildify("~/.profile")
|
const profile_path = untildify("~/.profile")
|
||||||
appendFileSync(profile_path, `\nexport PATH=${path}:$PATH\n`)
|
appendFileSync(profile_path, `\nexport PATH=${path}:$PATH\n`)
|
||||||
execa.commandSync(`source "${profile_path}"`)
|
// spawnSync(`source "${profile_path}"`, { shell: true })
|
||||||
core.info(`${path} was added to "${profile_path}"`)
|
core.info(`${path} was added to "${profile_path}"`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue