Skip to content

Commit

Permalink
use npm_config_local_prefix instead
Browse files Browse the repository at this point in the history
  • Loading branch information
endel committed May 25, 2023
1 parent 03b82bc commit e302b78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/tools/package.json
@@ -1,6 +1,6 @@
{
"name": "@colyseus/tools",
"version": "0.15.10",
"version": "0.15.11",
"description": "Colyseus Tools for Production",
"input": "./src/index.ts",
"main": "./build/index.js",
Expand Down
6 changes: 3 additions & 3 deletions packages/tools/post-deploy.js
Expand Up @@ -9,9 +9,9 @@ const maxCPU = os.cpus().length;
const NGINX_SERVERS_CONFIG_FILE = '/etc/nginx/colyseus_servers.conf';

// allow deploying from other path as root.
if (process.env.npm_config_prefix) {
process.chdir(process.env.npm_config_prefix);
pm2.cwd = process.env.npm_config_prefix;
if (process.env.npm_config_local_prefix) {
process.chdir(process.env.npm_config_local_prefix);
pm2.cwd = process.env.npm_config_local_prefix;
}

pm2.list(function(err, apps) {
Expand Down

0 comments on commit e302b78

Please sign in to comment.