mirror of
https://github.com/aljazceru/pear-docs.git
synced 2025-12-17 14:34:19 +01:00
shell profile overwrite gaurd
This commit is contained in:
@@ -156,8 +156,8 @@ customElements.define('system-status', class extends HTMLElement {
|
||||
} 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')
|
||||
if (zsh) fs.writeFileSync(path.join(os.homedir(), '.zshrc'), 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', { flags: 'a' })
|
||||
}
|
||||
|
||||
const pear = path.join(BIN, 'pear')
|
||||
|
||||
Reference in New Issue
Block a user