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

using with pwsh? #61

Closed
fdncred opened this issue Oct 28, 2020 · 5 comments
Closed

using with pwsh? #61

fdncred opened this issue Oct 28, 2020 · 5 comments
Labels
bug Something isn't working easy Low difficulty good first issue Good for newcomers

Comments

@fdncred
Copy link
Contributor

fdncred commented Oct 28, 2020

I was going to try silver out but I'm having problems. I did a cargo install silver and then init like this.

Invoke-Expression -Command $(silver init | Out-String)
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', C:\Users\username\.cargo\registry\src\github.com-1ecc6299db9ec823\silver-1.1.0\src\main.rs:57:55
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Invoke-Expression: Cannot bind argument to parameter 'Command' because it is an empty string.

any ideas what's going on?

Windows 10
Windows Terminal

@thecaralice
Copy link
Collaborator

Try installing it via cargo install --git https://github.com/reujab/silver

@fdncred
Copy link
Contributor Author

fdncred commented Oct 29, 2020

I fixed my problem late last night by changing main.rs like this.

                "powershell" | "pwsh" | "powershell.exe" | "pwsh.exe" => include_str!("init.ps1"),

But now I'm having problems finding the right place to put the config file. I thought I had figured it out by looking at the directories documentation but it's still not being read. Any clue where to put the config file in Windows?

@thecaralice
Copy link
Collaborator

%appdata%/roaming/silver/silver.toml I guess

@thecaralice thecaralice added bug Something isn't working easy Low difficulty good first issue Good for newcomers labels Oct 29, 2020
@fdncred
Copy link
Contributor Author

fdncred commented Oct 29, 2020

%appdata% resolves to users/username/appdata/roaming already so I put it in users/username/appdata/roaming/silver/silver.toml but it doesn't see it. not sure why.

@fdncred
Copy link
Contributor Author

fdncred commented Oct 29, 2020

after fixing the issue in #63 I found that the path for the config flie is really "C:\Users\username\AppData\Roaming\silver\config\silver.toml"

@fdncred fdncred closed this as completed Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working easy Low difficulty good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants