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

theme deploy errors silently #823

Closed
vfonic opened this issue Oct 13, 2020 · 1 comment · Fixed by #826
Closed

theme deploy errors silently #823

vfonic opened this issue Oct 13, 2020 · 1 comment · Fixed by #826

Comments

@vfonic
Copy link

vfonic commented Oct 13, 2020

// related: theme download errors out "silently"

If any file fails to upload (deploy), for example, a section file fails to upload because it has invalid schema, then deployment continues. Eventually, having deployment continue and finish, breaks the website, as the section file wasn't deployed along with all the other files.

Failing to upload any file should immediately fail the whole deployment.

To Reproduce
Steps to reproduce the behavior:

  1. Open any section file in the theme.
  2. Change "name" property inside of {% schema %} block to: "Collections Page Filter Header" (anything longer than 25 characters would do
  3. Run theme deploy

Or

3.b Run theme deploy sections/<your-section-name>.liquid

Run echo $? immediately after.

Here's the sample output from `theme deploy`
...
[production] Updated assets/currencies.jquery.min.js
[production] Updated assets/icon-strong.png
[production] Updated assets/styles-min.css
[production] Updated assets/linkedin.png
[production] Updated assets/whatsapp.png
[production] Updated assets/twitter.png
[production] Updated assets/ico-select-menu.svg.liquid
[production] Updated assets/icon-moderate.png
[production] Updated assets/facebook.png
[production] Updated assets/theme.js.liquid
[production] (sections/collections-page-filter-header.liquid) Invalid schema: name is too long (max 25 characters)
[production] Updated assets/mail_old.png
[production] Updated assets/logo.png
[production] Updated assets/password.js.liquid
[production] Updated assets/script.js
[production] Updated layout/theme.liquid
[production] Updated assets/gift-card.scss.liquid
[production] Updated assets/pointing.png
[production] Updated assets/mail.png
[production] Updated assets/simulator.js
[production] Updated assets/password-page-background.jpg
[production] Updated assets/vendor-scripts.js
...

Expected behavior

The command should fail.

echo $? - prints last command's exit code. It's 0 for success and different from 0 for failure.
It should print a non-zero code.

Environment (please complete the following information):

  • OS [e.g. iOS]: macOS 10.15.7
  • Themekit version (run theme version to check): 1.1.2 darwin/amd64
  • Editor [e.g. atom, sublime]: sublime
  • Ignore: /
@tanema
Copy link
Contributor

tanema commented Nov 20, 2020

Since we will not be merging anything around Black Friday/Cyber Monday, I have created a prerelease with the fixes for this issue included in it. You can install the prerelease by running theme update --version=v1.1.3-pre, please share any feedback that you have on this.

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 a pull request may close this issue.

2 participants