forked from ocaml/dune
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copy_files: error out if no files found (ocaml#10649)
* copy_files: error out if no files found Signed-off-by: Javier Chávarri <javier.chavarri@gmail.com>
- Loading branch information
1 parent
121a3c4
commit 83c8dc9
Showing
3 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Error out if no files are found when using `copy_files`. (#10649, @jchavarri) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Show that copy_files errors out if no files are found | ||
|
||
$ mkdir -p target foo | ||
$ cat >dune-project <<EOF | ||
> (lang dune 3.17) | ||
> EOF | ||
$ cat >target/dune <<EOF | ||
> (copy_files | ||
> (files ../foo/*.txt)) | ||
> EOF | ||
|
||
$ dune build | ||
File "target/dune", line 2, characters 8-20: | ||
2 | (files ../foo/*.txt)) | ||
^^^^^^^^^^^^ | ||
Error: Does not match any files | ||
[1] | ||
|
||
It doesn't error out in older dune lang versions | ||
|
||
$ cat >dune-project <<EOF | ||
> (lang dune 3.16) | ||
> EOF | ||
|
||
$ dune build |