Skip to content

Commit

Permalink
Quote {build.source.path} to allow spaces in path (#4868)
Browse files Browse the repository at this point in the history
Previously sketches or examples that had spaces anywhere in their absolute
path caused a total build failure. By adding quotes around the path in
platform.txt, they now build correctly

Co-authored-by: Me No Dev <me-no-dev@users.noreply.github.com>
  • Loading branch information
tttapa and me-no-dev committed Mar 26, 2021
1 parent 6674675 commit 46d5afb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ compiler.libraries.ldflags=

# Build Dir: {build.path}
# Sketch Dir: {build.source.path}
recipe.hooks.prebuild.1.pattern=bash -c "[ ! -f {build.source.path}/partitions.csv ] || cp -f {build.source.path}/partitions.csv {build.path}/partitions.csv"
recipe.hooks.prebuild.2.pattern=bash -c "[ -f {build.path}/partitions.csv ] || cp {runtime.platform.path}/tools/partitions/{build.partitions}.csv {build.path}/partitions.csv"
recipe.hooks.prebuild.1.pattern=bash -c "[ ! -f "{build.source.path}"/partitions.csv ] || cp -f "{build.source.path}"/partitions.csv "{build.path}"/partitions.csv"
recipe.hooks.prebuild.2.pattern=bash -c "[ -f "{build.path}"/partitions.csv ] || cp "{runtime.platform.path}"/tools/partitions/{build.partitions}.csv "{build.path}"/partitions.csv"
recipe.hooks.prebuild.1.pattern.windows=cmd /c if exist "{build.source.path}\partitions.csv" copy /y "{build.source.path}\partitions.csv" "{build.path}\partitions.csv"
recipe.hooks.prebuild.2.pattern.windows=cmd /c if not exist "{build.path}\partitions.csv" copy "{runtime.platform.path}\tools\partitions\{build.partitions}.csv" "{build.path}\partitions.csv"

Expand Down

0 comments on commit 46d5afb

Please sign in to comment.