diff --git a/.changes/pr_264.md b/.changes/pr_264.md new file mode 100644 index 00000000..ea59f440 --- /dev/null +++ b/.changes/pr_264.md @@ -0,0 +1,7 @@ +--- +"cargo-packager": patch +"@crabnebula/packager": patch +--- + +Fix `pacman` package failing to install when source directory contained whitespace. + diff --git a/crates/packager/src/package/pacman/mod.rs b/crates/packager/src/package/pacman/mod.rs index 52117e58..e9a60012 100644 --- a/crates/packager/src/package/pacman/mod.rs +++ b/crates/packager/src/package/pacman/mod.rs @@ -133,7 +133,7 @@ fn generate_pkgbuild_file( let sha_hash = sha512.finalize(); writeln!(file, "sha512sums=(\"{:x}\")", sha_hash)?; - writeln!(file, "package() {{\n\tcp -r ${{srcdir}}/* ${{pkgdir}}/\n}}")?; + writeln!(file, "package() {{\n\tcp -r \"${{srcdir}}\"/* \"${{pkgdir}}\"/\n}}")?; file.flush()?; Ok(())