3/15/2023 0 Comments Npm config set cafile![]() ![]() So, my Mac will check verify it’s connected to the correct registry every two This plist tells the OS to run my-daemon-script.js once every 120 seconds. Label com.npmrcd EnvironmentVariables PATH my-path-string HOME /Users/my-username Program my-daemon-script.js RunAtLoad StartInterval 120 StandardOutPath /tmp/npmrcd.stdout StandardErrorPath /tmp/npmrcd.stderr Probably my own fault since I just looked at the summary on the homepage of “oh I needed to specify the user and group it should run as”Įventually when I moved the plist into the folder ~/Library/LaunchAgents/Īnd ran launchctl load -w ist it worked! This confusion is.“why the hell can’t it find the node executable? It’s on my PATH!”.Sudo launchctl load -w ist, and changing various properties in the Library/LaunchAgents and /Library/LaunchDaemons, running variations of Would use the npmrc CLI to switch profiles, created a plist and tried to ![]() This seemed straightforward enough, until it wasn’t! I wrote a script that Depending on where it is stored it will be treated as a daemon or an agent. The behavior of a daemon/agent is specified in a special XML file called a property list (plist). Website summarises how to create a daemon/agent as follows: My primary development machine is a MacBook Pro, my search for setting upĪ daemon on macOS lead me to. Interval seemed like a reasonable solution, so I pursued that avenue. Agents and DaemonsĪutomating the switch between profiles by running a script on a regular I could focus purely on the automation work. ![]() ![]() The npmrc package worked perfectly despite not being updated in 5 years, andįinding an existing tool to manage the profiles saved me some time and meant Npm config set cafile $CA_FILEPATH # Switch back to the default profile Npm config set registry $CORPORATE_REGISTRY_URL ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |