create wrapper around kitten-npm so kitten-node is always used #303
No reviewers
Labels
No labels
documentation
error messages
examples
housekeeping
low priority
needs design
parser
tests
usability
accessibility
API
bug
CLI
contribution welcome
crash
deployment
duplicate
enhancement
feature branch
good first issue
help wanted
installer
invalid
is this still an issue?
linux
localisation
macOS
question
security
suggestion
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kitten/app!303
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "wunter8/kitten-app:kitten-npm-wrapper"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I had
nodeinstalled on my computer before installing Kitten. When I would runkitten-npm, it would use the previously-installednodeinstead ofkitten-node.This changes
kitten-npmfrom a simple symlink into a simple bash script that makes sure to prepend the KITTEN_RUNTIME_BINARIES_PATH to the PATH env variable before callingkitten-npmso that the version ofnodeinstalled by kitten is always used whenkitten-npmis called.This is basically replicating the functionality that already exists here:
export function npm (command, modulePath) {const env = Object.assign(process.env, {NODE_OPTIONS: ''})env.PATH = `${paths.KITTEN_RUNTIME_BIN_DIRECTORY}:${env.PATH}`try {childProcess.execSync(`${kittenNpm} ${command}`, {encoding: 'utf-8',env,cwd: modulePath})return true} catch (error) {console.error(`npm ${command} failed on path ${modulePath}`, error)return false}}124645cab3toc8f7e5a274View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.