Skip to content

Commit cf282bb

Browse files
committed
vercel ai suggestion
1 parent f6f9f58 commit cf282bb

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/lib/logging.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ import * as path from 'node:path';
33
import * as winston from 'winston';
44
import { camelToDash } from "./utils.js";
55

6-
const logFileName = path.join(homedir(), '.haxtheweb', 'create.log');
6+
// check for vercel running which is not allowed to write to home in logs
7+
let baseLogPath = homedir();
8+
if (process.env.VERCEL_ENV) {
9+
baseLogPath = "/tmp/";
10+
}
11+
const logFileName = path.join(baseLogPath, '.haxtheweb', 'create.log');
712
export const consoleTransport = new winston.transports.Console({
813
format: winston.format.simple()
914
});
@@ -31,7 +36,7 @@ export const logger = winston.createLogger({
3136
});
3237

3338
export function haxCliEnvOptions() {
34-
return ['skip','npmClient','i','extras','root','path','org','author', 'y', 'auto'];
39+
return ['skip','npmClient','i','extras','root','path','org','author', 'y', 'auto', 'domain'];
3540
}
3641

3742
// wrapper so we can silence all log messages at the same time

0 commit comments

Comments
 (0)