mirror of
https://github.com/Tarrasch/zsh-autoenv.git
synced 2024-12-22 19:00:15 +02:00
tests: use sed to prepend to .env file
This commit is contained in:
parent
6d8141d290
commit
175a4eb628
@ -50,7 +50,7 @@ Set timestamp of auth file into the past, so it gets seen as new below.
|
||||
|
||||
Add sub/sub2/.env file, with a call to autoenv_source_parent.
|
||||
|
||||
$ echo -e "echo autoenv_source_parent_from_sub2:\nautoenv_source_parent\necho done_sub2\n" > sub2/.env
|
||||
$ echo "echo autoenv_source_parent_from_sub2:\nautoenv_source_parent\necho done_sub2\n" > sub2/.env
|
||||
$ test_autoenv_add_to_env sub2/.env
|
||||
$ cd sub2
|
||||
autoenv_source_parent_from_sub2:
|
||||
@ -71,7 +71,8 @@ Move sub/.env away, now the root .env file should get sourced.
|
||||
Prepend call to autoenv_source_parent to sub/.env file.
|
||||
|
||||
$ cd ..
|
||||
$ echo -e "echo autoenv_source_parent_from_sub:\nautoenv_source_parent\n$(< .env)\necho done_sub" > .env
|
||||
$ sed -i -e "1s/^/echo autoenv_source_parent_from_sub:\nautoenv_source_parent\n/" .env
|
||||
$ echo "echo done_sub" >> .env
|
||||
$ touch -t 201401010103 .env
|
||||
$ test_autoenv_auth_env_files
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user