Skip to content

Commit

Permalink
tests fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
marcopiraccini committed Dec 5, 2023
1 parent 48eeb25 commit 60c0109
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/lib/import-or-local.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ async function importOrLocal ({ pkgManager, projectDir, pkg, logger }) {
const fileToImport = _require.resolve(pkg)
return await import(pathToFileURL(fileToImport))
} else {
// OSx and linux
const currentShell = process.env.SHELL || '/bin/zsh'
let sourceFile = '~/.zshrc'
if (currentShell === '/bin/bash') {
sourceFile = '~./bashrc'
}

// OSx and linux
const child = spawn(process.env.SHELL, ['-c', `. ${sourceFile}; npm i ${pkg}`], {
cwd: projectDir
})
Expand All @@ -61,7 +61,6 @@ async function importOrLocal ({ pkgManager, projectDir, pkg, logger }) {

child.on('error', async (err) => {
logger.error(err)
console.log(err)
})

return new Promise((resolve, reject) => {
Expand Down

0 comments on commit 60c0109

Please sign in to comment.