Skip to content

Commit

Permalink
fix: quote depends values in package() function
Browse files Browse the repository at this point in the history
  • Loading branch information
arlac77 committed May 13, 2019
1 parent 47d3ad8 commit 57e3876
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pkgbuild.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ build() {
}
package() {
depends=(${makeDepends(pkg.pacman.depends)})
depends=(${makeDepends(pkg.pacman.depends).map(a => `"${a}"`)})
mkdir -p \${pkgdir}${installdir}
${npmDistPackage}
Expand Down
2 changes: 1 addition & 1 deletion tests/pkgbuild-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test("pkgbuild", async t => {
t.regex(c, /pkgver='1.2.3'/);
t.regex(c, /source=\('git/);
t.regex(c, /depends=.*nodejs>=10.5/);
t.regex(c, /depends=\(redis>=5.0.3\)/);
t.regex(c, /depends=\("redis>=5.0.3"\)/);
t.regex(c, /backup=.*etc\/myservice\/myservice.json/);
t.regex(c, /install=.*myservice.install/);
t.regex(c, /arch=.*\(aarch64 armv7h\)/);
Expand Down

0 comments on commit 57e3876

Please sign in to comment.