linutil icon indicating copy to clipboard operation
linutil copied to clipboard

fix: Remove quotes for packages

Open jeevithakannan2 opened this issue 1 year ago • 13 comments

Type of Change

  • [ ] New feature
  • [x] Bug fix
  • [ ] Documentation update
  • [ ] Refactoring
  • [ ] Hotfix
  • [ ] Security patch
  • [ ] UI/UX improvement

Description

  • Remove unnecessary quotes around packages variable in compile-setup and gaming-setup.

Testing

  • Tested on arch linux works, no issues.

Issues / other PRs related

  • Resolves #690
  • Resolves #688

Checklist

  • [x] My code adheres to the coding and style guidelines of the project.
  • [x] I have performed a self-review of my own code.
  • [x] I have commented my code, particularly in hard-to-understand areas.
  • [ ] I have made corresponding changes to the documentation.
  • [x] My changes generate no errors/warnings/merge conflicts.

jeevithakannan2 avatar Sep 29 '24 08:09 jeevithakannan2

Same issue happens for gaming-setup.sh:26

JirakLu avatar Sep 29 '24 13:09 JirakLu

@JirakLu Ok will look into it

jeevithakannan2 avatar Sep 29 '24 14:09 jeevithakannan2

@jeevithakannan2 please take a look at the files changed in #454, it looks like some arrays got quoted erroneously by @nnyyxxxx

cartercanedy avatar Sep 30 '24 01:09 cartercanedy

Might be worth running a grep over the repo to find other any other quoted arrays, as well

cartercanedy avatar Sep 30 '24 01:09 cartercanedy

it looks like some arrays got quoted erroneously by @nnyyxxxx

wrong

ghost avatar Sep 30 '24 01:09 ghost

there are no instances of arrays getting erroneously quoted in my PR

ghost avatar Sep 30 '24 01:09 ghost

the only vars that got quoted in my PR were packager and escalation tool, and it was suggested by Chris that i do that

ghost avatar Sep 30 '24 01:09 ghost

it's also good practice to quote vars anyways, but it depends on the context behind those vars

ghost avatar Sep 30 '24 01:09 ghost

My bad, you're the first person that comes up in the git blame, so I must've misinterpreted the diffs. Either way, might be good to have your eyes on this.

cartercanedy avatar Sep 30 '24 01:09 cartercanedy

@jeevithakannan2 please take a look at the files changed in #454, it looks like some arrays got quoted erroneously by @nnyyxxxx

Yeah I will take a look at it later. I have exams this week. Will do it during my leisure time

jeevithakannan2 avatar Sep 30 '24 01:09 jeevithakannan2

it's also good practice to quote vars anyways, but it depends on the context behind those vars

Agreed, but arrays are one of those exceptions* unless being used in an eval

cartercanedy avatar Sep 30 '24 01:09 cartercanedy

If it is an array it will consider it as a string with space not as arrays, that's the problem here.

jeevithakannan2 avatar Sep 30 '24 02:09 jeevithakannan2

Correct, unless you're doing a string expansion inside the argument to eval or exec

cartercanedy avatar Sep 30 '24 02:09 cartercanedy