[Bug]: The contents of this file are auto-generated.
Please confirm that you have:
- [x] Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
- [x] Reproduced the issue in the latest CLI version.
In which of these areas are you experiencing a problem?
Theme
Expected behavior
Nothing, just pull my content
Actual behavior
I have this message in start of all my files after pulling.
/*
* ------------------------------------------------------------
* IMPORTANT: The contents of this file are auto-generated.
*
* This file may be updated by the Shopify admin theme editor
* or related systems. Please exercise caution as any changes
* made to this file may be overwritten.
* ------------------------------------------------------------
*/
The message is written multiple times, it's spam.
Verbose output
shopify theme dev --legacy
Reproduction steps
- Pull with shopify cli
Operating System
Windows 11
Shopify CLI version (check your project's package.json if you're not sure)
3.67.3
Shell
PowerShell
Node version (run node -v if you're not sure)
v22.5.1
What language and version are you using in your application?
ruby 3.0.6p216 (2023-03-30 revision 23a532679b) [x64-mingw32]
This was introduced with JSON comments being a thing. There is no bug nor is it spam.
How can I avoid getting this kind of addition with every pull?
👋 Hey @magify-expert-shopify,
Thank you for reporting this!
As @rcasimmons mentioned, the headers are expected behavior; they clarify which files may be auto-updated by Shopify and may lose comments and user-defined spaces.
However, they shouldn't be duplicated when pulling, as you shared. I'm investigating this issue, and I will mark this as fixed once it gets resolved.
Thanks again for reporting this!
Same issue
Same issue, I am not using --theme-editor-sync, but sometimes I need to run shopify theme pull -d to get one small change from the customizer. And I get a lot of frustrating unreal changes
I made a copy from the store from the main branch and when connecting to the copy of the topic, this comment is deleted, because of this the CLI starts to loop, but then stops, and this comment is lost (@shopify/cli/3.59.0 win32-x64 node-v18.12.1), I use the --theme-editor-sync flag. But if you go through the code editor, it is there.
Why if this code is in git and when connecting CLI this code is deleted?
Update CLI to the @shopify/cli/3.68.0 win32-x64 node-v18.12.1 - problem was FIXED
👋 Hey folks,
Headers no longer get duplicated. This issue has been resolved at the platform level, so no CLI upgrade is required.
Thank you for reporting this!
👋 Hey folks,
Headers no longer get duplicated. This issue has been resolved at the platform level, so no CLI upgrade is required.
Thank you for reporting this!
The problem is still in windows.
And I have the latest version of Shopify CLI at the moment