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

VSCode extractzip task has unintended results #31

Open
jurassicplayer opened this issue Sep 8, 2023 · 3 comments
Open

VSCode extractzip task has unintended results #31

jurassicplayer opened this issue Sep 8, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@jurassicplayer
Copy link
Contributor

jurassicplayer commented Sep 8, 2023

"command": "echo '${config:deckdir}/homebrew/plugins/${config:pluginname}.zip' && ssh ${config:deckuser}@${config:deckip} -p ${config:deckport} ${config:deckkey} 'echo ${config:deckpass} | sudo -S mkdir 755 -p \"$(echo \"${config:deckdir}/homebrew/plugins/${config:pluginname}\" | sed \"s| |-|\")\" && echo ${config:deckpass} | sudo -S chown ${config:deckuser}:${config:deckuser} \"$(echo \"${config:deckdir}/homebrew/plugins/${config:pluginname}\" | sed \"s| |-|\")\" && echo ${config:deckpass} | sudo -S bsdtar -xzpf \"${config:deckdir}/homebrew/plugins/${config:pluginname}.zip\" -C \"$(echo \"${config:deckdir}/homebrew/plugins/${config:pluginname}\" | sed \"s| |-|g\")\" --strip-components=1 --fflags '",

  • The mkdir command is making a ~/755 folder instead of making a new plugin folder with 755 permissions (needs the -m flag)
  • The files are extracted blindly into the folder (nothing is removed). This can leave older files when deploying after reorganizing folders/files/filenames/etc.
@TrainDoctor TrainDoctor self-assigned this Sep 8, 2023
@TrainDoctor TrainDoctor added the bug Something isn't working label Sep 8, 2023
@CarJem
Copy link

CarJem commented Oct 8, 2023

To add on top of this... I discovered another issue causing the following issue related to this
The sed command doesn't properly account for dashes when creating the folder for the destination to go into

 *  Executing task: echo '/home/deck/homebrew/plugins/SPGM WinTweaks Intergration Plugin.zip' && ssh deck@steamdeck -p 22 -i /home/carjem/.ssh/id_rsa 'echo pass | sudo -S mkdir 755 -p "$(echo "/home/deck/homebrew/plugins/SPGM WinTweaks Intergration Plugin" | sed "s| |-|")" && echo pass | sudo -S chown deck:deck "$(echo "/home/deck/homebrew/plugins/SPGM WinTweaks Intergration Plugin" | sed "s| |-|")" && echo pass | sudo -S bsdtar -xzpf "/home/deck/homebrew/plugins/SPGM WinTweaks Intergration Plugin.zip" -C "$(echo "/home/deck/homebrew/plugins/SPGM WinTweaks Intergration Plugin" | sed "s| |-|g")" --strip-components=1 --fflags ' 

/home/deck/homebrew/plugins/SPGM WinTweaks Intergration Plugin.zip
[sudo] password for deck: bsdtar: could not chdir to '/home/deck/homebrew/plugins/SPGM-WinTweaks-Intergration-Plugin'

image

@TrainDoctor
Copy link
Member

TrainDoctor commented Feb 5, 2024

@jurassicplayer I believe I have made changes that should help with your points on the extractzip-fix branch.
@CarJem I'll have another commit time permitting to help with that.

@TrainDoctor
Copy link
Member

To add on top of this... I discovered another issue causing the following issue related to this The sed command doesn't properly account for dashes when creating the folder for the destination to go into

 *  Executing task: echo '/home/deck/homebrew/plugins/SPGM WinTweaks Intergration Plugin.zip' && ssh deck@steamdeck -p 22 -i /home/carjem/.ssh/id_rsa 'echo pass | sudo -S mkdir 755 -p "$(echo "/home/deck/homebrew/plugins/SPGM WinTweaks Intergration Plugin" | sed "s| |-|")" && echo pass | sudo -S chown deck:deck "$(echo "/home/deck/homebrew/plugins/SPGM WinTweaks Intergration Plugin" | sed "s| |-|")" && echo pass | sudo -S bsdtar -xzpf "/home/deck/homebrew/plugins/SPGM WinTweaks Intergration Plugin.zip" -C "$(echo "/home/deck/homebrew/plugins/SPGM WinTweaks Intergration Plugin" | sed "s| |-|g")" --strip-components=1 --fflags ' 

/home/deck/homebrew/plugins/SPGM WinTweaks Intergration Plugin.zip
[sudo] password for deck: bsdtar: could not chdir to '/home/deck/homebrew/plugins/SPGM-WinTweaks-Intergration-Plugin'

For reference, no plugin should have a name with spaces in it so in future I will aim to add support for handling dashes but I'm pretty sure it's a non-issue and the issue is spaces in the plugin name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🏗 In progress
Development

No branches or pull requests

3 participants