File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ export const envDeleteCommand = new Command<EnvCommandContext>()
298298 const envVar = envVars . find ( ( envVar ) => envVar . key === variable ) ;
299299
300300 if ( ! envVar ) {
301- throw new Error ( `Environment variable '${ variable } ' not found` ) ;
301+ error ( options . debug , `Environment variable '${ variable } ' not found` ) ;
302302 }
303303
304304 // deno-lint-ignore no-explicit-any
Original file line number Diff line number Diff line change 1- import { Command } from "@cliffy/command" ;
1+ import { Command } from "jsr: @cliffy/command@^1.0.0-rc.8 " ;
22import { publish } from "./publish.ts" ;
33import { red , yellow } from "@std/fmt/colors" ;
44import { greaterOrEqual , parse as semverParse } from "@std/semver" ;
@@ -273,8 +273,13 @@ deploy your local directory to the specified application.`)
273273 . option ( "--prod" , "Deploy directly to production" )
274274 . arguments ( "[root-path:string]" )
275275 . globalAction ( ( options ) => {
276- if ( options . token ) {
277- token_storage . set ( options . token , true ) ;
276+ const endpoint = Deno . env . get ( "DENO_DEPLOY_ENDPOINT" ) ;
277+ if ( endpoint ) {
278+ options . endpoint = endpoint ;
279+ }
280+ const tokenEnv = options . token || Deno . env . get ( "DENO_DEPLOY_TOKEN" ) ;
281+ if ( tokenEnv ) {
282+ token_storage . set ( tokenEnv , true ) ;
278283 }
279284 } )
280285 . action (
Original file line number Diff line number Diff line change @@ -48,6 +48,13 @@ export async function withApp(
4848) : Promise < { org : string ; app : string | null } > {
4949 await getAuth ( debug , deployUrl ) ;
5050
51+ if ( ! org ) {
52+ org = Deno . env . get ( "DENO_DEPLOY_ORG" ) ;
53+ }
54+ if ( ! app ) {
55+ app = Deno . env . get ( "DENO_DEPLOY_APP" ) ;
56+ }
57+
5158 if ( ! org || ! app ) {
5259 const trpcClient = createTrpcClient ( debug , deployUrl ) ;
5360
You can’t perform that action at this time.
0 commit comments