update
This commit is contained in:
@@ -26,3 +26,10 @@ export const pathExists = (path: string, type?: 'file' | 'directory') => {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
export const normalizeScriptPath = (scriptPath: string): string => {
|
||||
if (process.platform === 'win32') {
|
||||
// 在 Windows 上,将反斜杠转换为正斜杠,PM2 更好地支持正斜杠
|
||||
return scriptPath.replace(/\\/g, '/');
|
||||
}
|
||||
return scriptPath;
|
||||
};
|
||||
Reference in New Issue
Block a user