Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix predeploy hooks for directories with spaces in the name #684

Merged
merged 1 commit into from
Mar 6, 2018

Conversation

sphippen
Copy link
Contributor

@sphippen sphippen commented Mar 3, 2018

Description

Before this change, the predeploy commands fail with an unhelpful error if you try to run the command from a directory with spaces in the name. Using double quotes when expanding $RESOURCE_DIR guarantees that the variable expands to a single parameter, instead of being split on spaces.

This should fix #658.

Scenarios Tested

All tests from "npm test" pass.

I can reproduce the error from #658 (predeploy error during firebase deploy) if I initialize the firebase directory in a directory that has a space anywhere in its full path. If I use these predeploy hooks instead, the deploy succeeds.

Sample Commands

This PR does not change any commands, it just fixes the default predeploy hooks.

Before this change, the predeploy commands fail with an unhelpful error if you try to run the command from a directory with spaces in the name. Using double quotes guarantees that the variable expands to a single parameter, instead of breaking on spaces.
@sphippen sphippen changed the title Quote shell variable expansion in functions predeploy commands. Fix predeploy hooks for directories with spaces in the name Mar 3, 2018
@coveralls
Copy link

coveralls commented Mar 3, 2018

Coverage Status

Coverage remained the same at 57.502% when pulling 1f666e9 on sphippen:shellpathexpansion into 0a101ca on firebase:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 57.502% when pulling 1f666e9 on sphippen:shellpathexpansion into 0a101ca on firebase:master.

@laurenzlong laurenzlong requested a review from tinaliang March 5, 2018 21:53
@tinaliang tinaliang merged commit 071450f into firebase:master Mar 6, 2018
joehan pushed a commit that referenced this pull request Apr 12, 2021
joehan added a commit that referenced this pull request Apr 13, 2021
* Add publisher to registry file fields (#686)

* Migrate ext:update ref-based flow to include update warnings + min extension version guard (#684)

* Migrate ext:install flow to install via extension reference and remove EAP gating (#679)

* Remove EAP-specific copy in ext:dev:register and ext:dev:publish command (#691)

* Warn user that unpublishing is final in ext:dev:unpublish command (#693)

* Add extMinVersion flag to ext:dev:unpublish command (#698)

* Migrate ext:info flow to retrieve spec from Registry API (#683)

* Migrate "author" terminology to use "publisher" in Extensions CLI commands (#694)

* Fix bug in confirmInstallByReference and refactor ext:install error messages (#702)

* Fix local path detection logic and refactor warnings logic in ext:update flow (#703)

* Migrate extensions warnings relating to audiences to use (backend) launch stage and visibility fields (#705)

* Only infer firebase if publisher not provided as part of user input in ext:info flow (#708)

* Adds new warning prompt for non-trusted publishers during ext:install (#707)

* add new warning prompt for non-trusted publishers during ext:install

* clean up param namne

* clean up comment

* switch from author ulr to sourceUrl

* no please

* Update copy to link user to documentation on ext:install flow if input not found (#711)

* Adds console install link to ext:dev:publish (#709)

* Adds console install link to ext:dev:publish

* formats

* Add firebase ext:dev:delete command to CLI (#712)

* adds changelog

* formats

Co-authored-by: huangjeff5 <[email protected]>
Co-authored-by: Jeff Huang <[email protected]>
Co-authored-by: Elvis Sun <[email protected]>
devpeerapong pushed a commit to devpeerapong/firebase-tools that referenced this pull request Dec 14, 2021
* Add publisher to registry file fields (firebase#686)

* Migrate ext:update ref-based flow to include update warnings + min extension version guard (firebase#684)

* Migrate ext:install flow to install via extension reference and remove EAP gating (firebase#679)

* Remove EAP-specific copy in ext:dev:register and ext:dev:publish command (firebase#691)

* Warn user that unpublishing is final in ext:dev:unpublish command (firebase#693)

* Add extMinVersion flag to ext:dev:unpublish command (firebase#698)

* Migrate ext:info flow to retrieve spec from Registry API (firebase#683)

* Migrate "author" terminology to use "publisher" in Extensions CLI commands (firebase#694)

* Fix bug in confirmInstallByReference and refactor ext:install error messages (firebase#702)

* Fix local path detection logic and refactor warnings logic in ext:update flow (firebase#703)

* Migrate extensions warnings relating to audiences to use (backend) launch stage and visibility fields (firebase#705)

* Only infer firebase if publisher not provided as part of user input in ext:info flow (firebase#708)

* Adds new warning prompt for non-trusted publishers during ext:install (firebase#707)

* add new warning prompt for non-trusted publishers during ext:install

* clean up param namne

* clean up comment

* switch from author ulr to sourceUrl

* no please

* Update copy to link user to documentation on ext:install flow if input not found (firebase#711)

* Adds console install link to ext:dev:publish (firebase#709)

* Adds console install link to ext:dev:publish

* formats

* Add firebase ext:dev:delete command to CLI (firebase#712)

* adds changelog

* formats

Co-authored-by: huangjeff5 <[email protected]>
Co-authored-by: Jeff Huang <[email protected]>
Co-authored-by: Elvis Sun <[email protected]>
yuchenshi pushed a commit that referenced this pull request Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Functions Predeploy Error
3 participants