cli icon indicating copy to clipboard operation
cli copied to clipboard

[Bug]: The contents of this file are auto-generated.

Open magify-expert-shopify opened this issue 1 year ago • 6 comments

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

  1. 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]

magify-expert-shopify avatar Oct 01 '24 16:10 magify-expert-shopify

This was introduced with JSON comments being a thing. There is no bug nor is it spam.

rcasimmons avatar Oct 02 '24 10:10 rcasimmons

How can I avoid getting this kind of addition with every pull? Image

magify-expert-shopify avatar Oct 03 '24 00:10 magify-expert-shopify

👋 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!

karreiro avatar Oct 03 '24 07:10 karreiro

Same issue Image

EvilestVirus7 avatar Oct 07 '24 02:10 EvilestVirus7

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 Image

AndrieseiMiruna avatar Oct 08 '24 06:10 AndrieseiMiruna

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. Image 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

k0syak avatar Oct 08 '24 11:10 k0syak

👋 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!

karreiro avatar Oct 11 '24 07:10 karreiro

👋 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.

Image

And I have the latest version of Shopify CLI at the moment

Image

miguel-dango avatar Oct 17 '24 18:10 miguel-dango