diff --git a/lib/system-status.js b/lib/system-status.js index 10df3ee..04a0aa5 100644 --- a/lib/system-status.js +++ b/lib/system-status.js @@ -211,17 +211,17 @@ customElements.define('system-status', class extends HTMLElement { }) }) } - + const comment = '# Added by Pear Runtime, configures system with Pear CLI\n' const profiles = Object.values(this.shellProfiles) if (profiles.length > 0) { for (const { filepath, hasPear } of profiles) { - if (hasPear === false) fs.writeFileSync(filepath, '\n' + this.statement + '\n', { flag: 'a' }) + if (hasPear === false) fs.writeFileSync(filepath, '\n' + comment + this.statement + '\n', { flag: 'a' }) } } else { const bash = this.paths.some((bin) => fs.existsSync(path.join(bin, 'bash'))) const zsh = this.paths.some((bin) => fs.existsSync(path.join(bin, 'zsh'))) fs.writeFileSync(path.join(os.homedir(), bash ? '.bashrc' : '.profile'), this.statement + '\n', { flag: 'a' }) - if (zsh) fs.writeFileSync(path.join(os.homedir(), '.zshrc'), this.statement + '\n', { flag: 'a' }) + if (zsh) fs.writeFileSync(path.join(os.homedir(), '.zshrc'), '\n' + comment + this.statement + '\n', { flag: 'a' }) } const pear = path.join(BIN, 'pear')