Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Spicetify-cli: Some scripts are not recognised as cmdlet, scripts, ... #11

Closed
jacob-thanh opened this issue Apr 2, 2022 · 3 comments
Closed

Comments

@jacob-thanh
Copy link

When I first installed and later updated this bucket through scoop, I got this error message:

The term: init-spicetify-config-and-apply.ps1 is not recognized as a name of a cmdlet, function, script ...

Basically it's not in path, and failed the rest of the installation process.

It seems that all the scripts from this bucket's scripts folder are not copied into where spicetify-cli is installed. I did a manually fix by copying all scripts into where it's needed, but each update is troublesome. So I submit a new issue.
This error may happened because there is another bucket (main) which also contains spicetify-cli, and this line in your spicetify-cli:

      "installer": {
        "script": [
            "...",
            "$null, $bucket = find_manifest($app)", <---
            "$bucketdir = Find-BucketDirectory($bucket)",
           "...", 
        ]
      } 

Without find_manifest($app, $bucket) specifying which bucket, it's set to default as main bucket, whose script folder does not contains necessary scripts like init-spicetify-config-and-apply.ps1, spicetify-apply.ps1, ... and the following line

    @(all the scripts) | ForEach-Object { Copy-Item "..." } ;

fail, never made it into spicetify-cli installation directory.
I suggest changing that line into

    "$null, $bucket = find_manifest $app 'spotify'",

as

     find_manifest($app, 'spotify'),

both will be passed as array into $app param.
I am submitting this issue to both the original repo and your fork (as the original still getting new commits and Buckets | Scoop still linked to that repo).
I'm sorry for the verbosity, hope this help anyone who encounter the same problem as I did.

@rollingmoai
Copy link

@karthikvinayan
Copy link
Owner

Thank you for you input @jacob-thanh but as @itsmeboy0 said, feel free to switch to the official repo.

However I will definitley implement what you suggested. If you want, feel free to submit the change as a Pull Request so that it will be credited as your idea.

I didn't notice this issue since I was manually holding back from updating spotify and spicetify due to compatibality issues with 1.1.82 version of spotify

@karthikvinayan
Copy link
Owner

a452d97

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants