Skip to content

Commit

Permalink
Merge branch 'dev' into releases/v1
Browse files Browse the repository at this point in the history
  • Loading branch information
leoli0605 committed May 9, 2024
2 parents 3cceb4a + 955a701 commit 2ac77e5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class SetupManager {

selectedPackages.forEach((p) => p && this.shell.addCommand(p.installCommand));

refreshEnvironment();
this.refreshEnvironment();

if (selectedPackages.some((p) => p && p.packageName.startsWith('Python'))) {
if (os.platform() === 'win32') {
Expand All @@ -57,7 +57,7 @@ class SetupManager {
/* Install Poetry */
const poetryInstallCommand = os.platform() === 'win32' ? '(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -' : 'asdf plugin add poetry && asdf install poetry latest && asdf global poetry latest';
this.shell.addCommand(poetryInstallCommand);
refreshEnvironment();
this.refreshEnvironment();
this.shell.addCommand('poetry --version');
this.shell.addCommand('poetry config virtualenvs.in-project true');
this.shell.addCommand(fs.readFileSync(path.join(__dirname, 'scripts/pip.setup'), 'utf8').trim());
Expand All @@ -80,11 +80,11 @@ class SetupManager {
console.log('Ubuntu 20.04 not detected');
}
}
refreshEnvironment();
this.refreshEnvironment();
this.shell.addCommand('node --version');
this.shell.addCommand('npm --version');
this.shell.addCommand(fs.readFileSync(path.join(__dirname, 'scripts/npm.setup'), 'utf8').trim());
refreshEnvironment();
this.refreshEnvironment();
}

if (os.platform() === 'win32' && selectedPackages.some((p) => p && p.packageName.startsWith('Sublime Text'))) {
Expand All @@ -97,7 +97,7 @@ class SetupManager {
this.shell.addCommand(fs.readFileSync(path.join(__dirname, 'scripts/macos/macsetup.sh'), 'utf8').trim());
}

if (!isLinuxRunAsRoot()) this.shell.addCommand('npx @leoli0605/git-setup');
if (!this.isLinuxRunAsRoot()) this.shell.addCommand('npx @leoli0605/git-setup');
}

setupNonWindowsEnvironment() {
Expand Down

0 comments on commit 2ac77e5

Please sign in to comment.