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

Upload empty cartridge zip files when workspace absolute path contains ".git" chars #382

Open
y-konishi opened this issue Dec 5, 2024 · 0 comments

Comments

@y-konishi
Copy link

y-konishi commented Dec 5, 2024

Describe the bug
When VSCode workspace is located under a folder that name contains ".git" char (like foo.github.com),
the prophet uploader creates empty cartridge zip files and upload them to the B2C Commerce WebDAV and unzip them.
As a result, all files in the WebDAV are removed.

To Reproduce

  1. VSCode workspace is located under the "foo.github.com" folder.
  2. Execute Prophet command "Clean project/Upload all".
  3. Wait until the upload process is complete (Maybe complete quite quickly).
  4. Check cartridge folder on the WebDAV.

Expected behavior
Upload proper cartridge zip files and unzip them.
After upload process, there are all files in the cartridges on the WebDAV.

Desktop (please complete the following information):

  • OS: macOS 14.7.1
  • VSCode version info
    • Version: 1.95.3
    • Electron: 32.2.1
    • ElectronBuildId: 10427718
    • Chromium: 128.0.6613.186
    • Node.js: 20.18.0
    • V8: 12.8.374.38-electron.0
    • OS: Darwin arm64 23.6.0
  • The extension version: v1.4.40

Screenshots
ProphetUploder_VerboseLog

Additional context
I use ghq for repository management.
This tool creates a folder that name is the hostname of the origin URL.
So, this issue only occurred in some workspaces.

I tried to debug the upload process (print debugging by modification installed extension source code...).
And finally, I found out that all files are ignored.

Default ignore list configuration of the prophet uploader is ['node_modules', '\\.git', '\\.zip$'].
I changed the item '\\.git' to '\\.git/' and I got the expected behavior.

I think this default configuration is set to ignore ".git" folder.
Changing the default ignore list configuration item '\\.git' to '\\.git/' still achieve this goal and I think we can reduce the possibility of this false positive.
Or it is better to change ignore check in WebDAV.getFileList() from target file absolute path to workspace relative path.

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

No branches or pull requests

1 participant