We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 99f1c13 commit f8f37b9Copy full SHA for f8f37b9
1 file changed
ātests/attributes.rsā
@@ -356,6 +356,32 @@ baz x=`echo ${foo}.txt`:
356
.run();
357
}
358
359
+#[test]
360
+fn env_attribute_not_in_env_function() {
361
+ Test::new()
362
+ .justfile(
363
+ r#"
364
+
365
+[env("foo", "bar")]
366
+baz:
367
+ @echo {{ env("foo") }}.txt
368
369
+ "#,
370
+ )
371
+ .stderr(
372
373
+error: Call to function `env` failed: environment variable `foo` not present
374
+ āāā¶ justfile:4:12
375
+ ā
376
+4 ā @echo {{ env("foo") }}.txt
377
+ ā ^^^
378
379
+"#,
380
381
+ .status(EXIT_FAILURE)
382
+ .run();
383
+}
384
385
#[test]
386
fn env_attribute_too_few_arguments() {
387
Test::new()
0 commit comments