Skip to content

Commit 8cb0de1

Browse files
authored
Add more environment variables to detect cloud environments (#9408)
1 parent 9e8d510 commit 8cb0de1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/utils.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,12 @@ export function datetimeString(d: Date): string {
566566
* Indicates whether the end-user is running the CLI from a cloud-based environment.
567567
*/
568568
export function isCloudEnvironment() {
569-
return !!process.env.CODESPACES || !!process.env.GOOGLE_CLOUD_WORKSTATIONS;
569+
return (
570+
!!process.env.CODESPACES ||
571+
!!process.env.GOOGLE_CLOUD_WORKSTATIONS ||
572+
!!process.env.CLOUD_SHELL ||
573+
!!process.env.GOOGLE_CLOUD_SHELL
574+
);
570575
}
571576

572577
/**

0 commit comments

Comments
 (0)