0f03f5aad4
🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
20 lines
390 B
TypeScript
20 lines
390 B
TypeScript
export function isNonInteractive(): boolean {
|
|
if (process.env.CI === "true" || process.env.CI === "1") {
|
|
return true
|
|
}
|
|
|
|
if (process.env.OPENCODE_RUN === "true" || process.env.OPENCODE_NON_INTERACTIVE === "true") {
|
|
return true
|
|
}
|
|
|
|
if (process.env.GITHUB_ACTIONS === "true") {
|
|
return true
|
|
}
|
|
|
|
if (process.stdout.isTTY !== true) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|