Skip to content

Commit a589d3e

Browse files
authored
Merge pull request #36 from YellowApple/patch-1
Assorted `README.md` updates
2 parents aed1f0b + 9d0ce57 commit a589d3e

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

README.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,11 @@ We allow you to add YAML front matter to all files to specify versions more
9696
precisely:
9797
9898
```toml
99+
# ---
99100
# pkgx:
100-
# openssl.org: 1.1.1n
101+
# dependencies:
102+
# openssl.org: 1.1.1n
103+
# ---
101104
102105
[package]
103106
name = "my cargo project"
@@ -107,7 +110,10 @@ name = "my cargo project"
107110
We allow more terse expressions including eg:
108111
109112
```toml
110-
# pkgx: [email protected] deno^2 npm
113+
# ---
114+
# pkgx:
115+
# dependencies: [email protected] deno^2 npm
116+
# ---
111117
```
112118
113119
The 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.
130138
You 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

0 commit comments

Comments
 (0)