Skip to content

Commit ded42d5

Browse files
committed
fix: make cpprc editable by the user
1 parent f9582b6 commit ded42d5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/utils/env/addEnv.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { error, warning } from "ci-log"
66
import { execPowershell } from "exec-powershell"
77
import { delimiter } from "path"
88
import escapeSpace from "escape-path-with-spaces"
9+
import { giveUserAccess } from "user-access"
910

1011
/**
1112
* Add an environment variable.
@@ -125,6 +126,10 @@ export function setupCppInProfile() {
125126
appendFileSync(cpprc_path, `\n${source_cpprc_str}\n`)
126127
info(`Added ${source_cpprc_str} to ${cpprc_path}`)
127128

129+
giveUserAccess(cpprc_path)
130+
131+
// source cpprc in bashrc/profile
132+
128133
const source_cpprc_string = `\n# source .cpprc if SOURCE_CPPRC is not set to 0\nif [[ "$SOURCE_CPPRC" != 0 && -f "${cpprc_path}" ]]; then source "${cpprc_path}"; fi\n`
129134

130135
try {

0 commit comments

Comments
 (0)