File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 "imports" : {
3434 "is-what" : " https://deno.land/x/is_what@v4.1.8/src/index.ts" ,
3535 "jsonc" : " https://deno.land/x/jsonc_parser@v0.0.1/mod.ts" ,
36- "tea" : " https://raw.github.com/teaxyz/lib/v0.1.3 /mod.ts" ,
37- "tea/" : " https://raw.github.com/teaxyz/lib/v0.1.3 /src/" ,
36+ "tea" : " https://raw.github.com/teaxyz/lib/v0.1.5 /mod.ts" ,
37+ "tea/" : " https://raw.github.com/teaxyz/lib/v0.1.5 /src/" ,
3838 "outdent" : " https://deno.land/x/outdent@v0.8.0/mod.ts" ,
3939 "cliffy/" : " https://deno.land/x/cliffy@v0.25.7/" ,
4040 "deno/" : " https://deno.land/std@0.187.0/" ,
Original file line number Diff line number Diff line change @@ -40,12 +40,12 @@ export interface Config extends ConfigBase {
4040
4141export default function ( input ?: Config ) : Config {
4242 if ( ! _internals . initialized ( ) ) {
43- const rv = useConfig ( input ?? ConfigDefault ( ) ) as Config
44- return rv
43+ input ??= ConfigDefault ( )
4544 } else {
4645 if ( input ) console . warn ( "useConfig() already initialized, new parameters ignored" )
47- return useConfig ( ) as Config
46+ input = undefined
4847 }
48+ return useConfig ( input ) as Config
4949}
5050
5151export function ConfigDefault ( flags ?: Flags , arg0 = Deno . execPath ( ) , env = Deno . env . toObject ( ) ) : Config {
Original file line number Diff line number Diff line change @@ -6,14 +6,14 @@ import { Path } from "tea"
66
77it ( suite , "runtime.env tildes" , async function ( ) {
88 const run = async ( FOO : string ) => {
9- this . sandbox . join ( "projects/tea.xyz/foo" ) . mkpath ( ) . join ( "package.yml" ) . write ( { text : undent `
9+ this . sandbox . join ( "projects/tea.xyz/foo" ) . mkdir ( 'p' ) . join ( "package.yml" ) . write ( { text : undent `
1010 provides: [bin/foo]
1111 runtime:
1212 env:
1313 FOO: "${ FOO } "
1414 ` , force : true } )
1515
16- this . sandbox . join ( "tea.xyz/foo/v1.0.0/bin" ) . mkpath ( ) . join ( "foo" ) . write ( { text : undent `
16+ this . sandbox . join ( "tea.xyz/foo/v1.0.0/bin" ) . mkdir ( 'p' ) . join ( "foo" ) . write ( { text : undent `
1717 #!/bin/sh
1818 echo "$FOO"
1919 ` , force : true } ) . chmod ( 0o755 )
You can’t perform that action at this time.
0 commit comments