Skip to content

Commit a06af07

Browse files
committed
fix: add a new line before/after the guard headers
1 parent c0d283f commit a06af07

File tree

8 files changed

+38
-20
lines changed

8 files changed

+38
-20
lines changed

dist/actions/setup-cpp.js

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/actions/setup-cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/setup-cpp.js

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/setup-cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modern/setup-cpp.js

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/modern/setup-cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/os-env/src/rc-file.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export type RcOptions = {
1818

1919
async function sourceRCInRc_(options: RcOptions) {
2020
const sourceRcString = options.guard === undefined
21-
? `source "${options.rcPath}"`
22-
: `# ${options.guard}\nif [[ "$SOURCE_${options.guard.toUpperCase()}RC" != 0 && -f "${options.rcPath}" ]]; then source "${options.rcPath}"; fi`
21+
? `\nsource "${options.rcPath}"\n`
22+
: `\n# ${options.guard}\nif [[ "$SOURCE_${options.guard.toUpperCase()}RC" != 0 && -f "${options.rcPath}" ]]; then source "${options.rcPath}"; fi\n`
2323

2424
try {
2525
await Promise.all([
@@ -40,8 +40,8 @@ export const sourceRCInRc = memoize(sourceRCInRc_, { isPromise: true })
4040
async function addRCHeader(options: RcOptions) {
4141
// a variable that prevents source rc from being called from .bashrc and .profile
4242
const rcHeader = options.guard === undefined
43-
? "# Automatically Generated by os-env"
44-
: `# Automatically Generated by os-env ${options.guard}\nexport SOURCE_${options.guard.toUpperCase()}RC=0`
43+
? "\n# Automatically Generated by os-env\n"
44+
: `\n# Automatically Generated by os-env ${options.guard}\nexport SOURCE_${options.guard.toUpperCase()}RC=0\n`
4545

4646
if (await pathExists(options.rcPath)) {
4747
const rcContent = await readFile(options.rcPath, "utf8")

src/utils/setup/setupAptPack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ let didUpdate: boolean = false
1616
let didInit: boolean = false
1717

1818
// wait up to 300 seconds if the apt-get lock is held
19-
export const aptTimeout = "DPkg::Lock::Timeout=300"
19+
export const aptTimeout = "Dpkg::Lock::Timeout=300"
2020

2121
export type AptPackage = {
2222
name: string

0 commit comments

Comments
 (0)