Skip to content

Commit

Permalink
fix: ensure module build paths have trailing slash (for rsync)
Browse files Browse the repository at this point in the history
Rsync won't copy dot files if the source path ends with a wildcard.
Rather it should have a trailing slash.

Bad: 'path/to/dir/*'
Good: 'path/to/dir/'
  • Loading branch information
eysi09 committed May 25, 2018
1 parent 32c4b2e commit 1c555d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/hello-world/services/hello-function/garden.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ module:
dependencies:
- name: hello-npm-package
copy:
- source: "*"
- source: "./"
target: libraries/hello-npm-package/
3 changes: 2 additions & 1 deletion src/build-dir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
join,
parse,
resolve,
sep,
} from "path"
import {
emptyDir,
Expand Down Expand Up @@ -46,7 +47,7 @@ export class BuildDir {

async syncFromSrc(module: Module) {
await this.sync(
resolve(this.projectRoot, module.path, "*"),
resolve(this.projectRoot, module.path) + sep,
await this.buildPath(module),
)
}
Expand Down

0 comments on commit 1c555d1

Please sign in to comment.