File tree Expand file tree Collapse file tree 1 file changed +22
-13
lines changed
Expand file tree Collapse file tree 1 file changed +22
-13
lines changed Original file line number Diff line number Diff line change @@ -96,8 +96,11 @@ We allow you to add YAML front matter to all files to specify versions more
9696precisely:
9797
9898` ` ` toml
99+ # ---
99100# pkgx:
100- # openssl.org: 1.1.1n
101+ # dependencies:
102+ # openssl.org: 1.1.1n
103+ # ---
101104
102105[package]
103106name = " my cargo project"
@@ -107,7 +110,10 @@ name = "my cargo project"
107110We allow more terse expressions including eg:
108111
109112` ` ` toml
110- # pkgx: [email protected] deno^2 npm113+ # ---
114+ # pkgx:
115+ # dependencies: [email protected] deno^2 npm116+ # ---
111117` ` `
112118
113119The major exception being json since it doesn’t support comments, in this case
@@ -116,9 +122,11 @@ we read a special `pkgx` node:
116122` ` ` json
117123{
118124 " pkgx" : {
119- " openssl.org" : " 1.1.1n" ,
120- " deno" : " ^2" ,
121- " npm" : null
125+ " dependencies" : {
126+ " openssl.org" : " 1.1.1n" ,
127+ " deno" : " ^2" ,
128+ " npm" : null
129+ }
122130 }
123131}
124132` ` `
@@ -130,18 +138,19 @@ You can also make a `pkgx.yaml` file.
130138You can add your own environment variables if you like:
131139
132140` ` ` toml
141+ # ---
133142# pkgx:
134- # openssl.org: 1.1.1n
135- # env:
136- # MY_VAR: my-value
143+ # dependencies:
144+ # openssl.org: 1.1.1n
145+ # env:
146+ # MY_VAR: my-value
147+ # ---
137148` ` `
138149
139- > [! CAUTION ]
150+ > [! NOTE ]
140151>
141- > The assignment of these variables are run through the shell, so you can do
142- > stuff like ` $( pwd) ` if you like. Obviously, be careful with that—we don’t
143- > sanitize the input. We will accept a PR to escape this by default or something
144- > ∵ we agree this is maybe a bit insane.
152+ > The environment variable' s value is sanitized, so expressions like
153+ > `MY_VAR: $(sudo rm -rf --no-preserve-root /)` will throw an error.
145154
146155## `dev` & Editors
147156
You can’t perform that action at this time.
0 commit comments