mirror of
https://github.com/aljazceru/pear-docs.git
synced 2025-12-18 15:04:26 +01:00
shell profile overwrite gaurd
This commit is contained in:
@@ -156,8 +156,8 @@ customElements.define('system-status', class extends HTMLElement {
|
|||||||
} else {
|
} else {
|
||||||
const bash = this.paths.some((bin) => fs.existsSync(path.join(bin, 'bash')))
|
const bash = this.paths.some((bin) => fs.existsSync(path.join(bin, 'bash')))
|
||||||
const zsh = this.paths.some((bin) => fs.existsSync(path.join(bin, 'zsh')))
|
const zsh = this.paths.some((bin) => fs.existsSync(path.join(bin, 'zsh')))
|
||||||
fs.writeFileSync(path.join(os.homedir(), bash ? '.bashrc' : '.profile'), this.statement + '\n')
|
fs.writeFileSync(path.join(os.homedir(), bash ? '.bashrc' : '.profile'), this.statement + '\n', { flags: 'a' })
|
||||||
if (zsh) fs.writeFileSync(path.join(os.homedir(), '.zshrc'), this.statement + '\n')
|
if (zsh) fs.writeFileSync(path.join(os.homedir(), '.zshrc'), this.statement + '\n', { flags: 'a' })
|
||||||
}
|
}
|
||||||
|
|
||||||
const pear = path.join(BIN, 'pear')
|
const pear = path.join(BIN, 'pear')
|
||||||
|
|||||||
Reference in New Issue
Block a user