From 4a4513b34217ba7d86616b9374fee9735003a1f3 Mon Sep 17 00:00:00 2001 From: Mac Heller-Ogden Date: Fri, 10 Feb 2017 14:21:07 -0600 Subject: [PATCH] fix minor spacing issue in setup of bash_profile --- setup.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/setup.js b/setup.js index 693f7a1..cfbff79 100755 --- a/setup.js +++ b/setup.js @@ -56,8 +56,7 @@ function setup() { export BITCAR_ROOT_DIR='${answers.rootDir}' source $HOME/.bitcar/cli.sh source $HOME/.bitcar/completions.sh -# end bitcar -` +# end bitcar` const configContent = { sources: [] }; @@ -78,8 +77,8 @@ source $HOME/.bitcar/completions.sh fs.copy(path.normalize(__dirname + '/dotfiles/strip_codes'), path.normalize(process.env.HOME + '/.bitcar/strip_codes')); fs.copy(path.normalize(process.env.HOME + '/.bash_profile'), path.normalize(process.env.HOME + '/.bash_profile.bkup')); const bashProfile = fs.read(path.normalize(process.env.HOME + '/.bash_profile')); - let cleanedProfile = bashProfile.replace(/\n# begin bitcar[\s\S]+# end bitcar\n/gm, ''); - cleanedProfile = cleanedProfile + os.EOL + profileContent; + let cleanedProfile = bashProfile.replace(/\n# begin bitcar[\s\S]+# end bitcar/gm, ''); + cleanedProfile = cleanedProfile + profileContent; fs.write(path.normalize(process.env.HOME + '/.bash_profile'), cleanedProfile); return fs.commit(function (err) {