diff options
author | Martino Fontana <tinozzo123@tutanota.com> | 2023-04-04 14:49:33 +0200 |
---|---|---|
committer | Yt <happysalada@proton.me> | 2023-04-04 11:54:11 -0400 |
commit | 460168712363202aaecc2bf608598f1a8957e43d (patch) | |
tree | 7e7118baf06e6f7632a2d547cab6968e9a6e5df6 /pkgs/shells/fish | |
parent | 51d7be2c343141d2f10d13b8d0413b3f977986cc (diff) |
buildFishPlugin: check if any .fish file exists in source
Diffstat (limited to 'pkgs/shells/fish')
-rw-r--r-- | pkgs/shells/fish/plugins/build-fish-plugin.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/shells/fish/plugins/build-fish-plugin.nix b/pkgs/shells/fish/plugins/build-fish-plugin.nix index b5d813133c5b0..807d5835f1ee0 100644 --- a/pkgs/shells/fish/plugins/build-fish-plugin.nix +++ b/pkgs/shells/fish/plugins/build-fish-plugin.nix @@ -45,9 +45,11 @@ stdenv.mkDerivation (drvAttrs // { source="$1" target="$out/share/fish/vendor_$2.d" - [ -d $source ] || return 0 + # Check if any .fish file exists in $source + [ -n "$(shopt -s nullglob; echo $source/*.fish)" ] || return 0 + mkdir -p $target - cp -r $source/*.fish "$target/" + cp $source/*.fish "$target/" } install_vendor_files completions completions |