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

change install directory? #249

Closed
parisio opened this issue Dec 26, 2014 · 10 comments
Closed

change install directory? #249

parisio opened this issue Dec 26, 2014 · 10 comments

Comments

@parisio
Copy link

@parisio parisio commented Dec 26, 2014

Hi. Sorry if this explained elsewhere but I couldn't quite find the answer I'm looking for.
Just wondering if I can change the location of pshazz from /scoop/apps and /scoop/shims to something like C:\dev\stuff

If so, what do I have to change (eg. path references)? Do I have to move the whole of scoop (is that even possible with reinstalling)? Do I have to edit the $path variable in /scoop/shims/pshazz.ps1?
I'm a novice, so I'm just throwing out the things I can think of.
I just find the location of scoop in appdata kind of awkward; pshazz gets buried and I end up forgetting about it until I look in my powershell profile.

Any help would be appreciated. Thanks.

@lukesampson

This comment has been minimized.

Copy link
Owner

@lukesampson lukesampson commented Dec 26, 2014

You can use the $env:SCOOP environment variable to change the install location to something other than ~\appdata\local\scoop. You can set it directly, but that only lasts for the current powershell session, so you probably want to do this instead:

[environment]::setEnvironmentVariable('SCOOP','C:\dev\stuff','User')

You should do this before you install Scoop, so you'll need to run scoop uninstall scoop if you've already installed it. If you want to keep what you've already installed, it could get messy but the steps are:

  1. Copy ~\appdata\local\scoop\ somewhere else
  2. Run scoop uninstall scoop
  3. Set $env:SCOOP
  4. Re-install scoop with iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
  5. Copy your saved scoop folder from step 1 back over the top of the new folder.

Hope that helps.

@parisio

This comment has been minimized.

Copy link
Author

@parisio parisio commented Dec 27, 2014

Thanks for the reply. I don't mind doing a fresh install. Will report back if I encounter difficulties.

@damnhandy

This comment has been minimized.

Copy link
Contributor

@damnhandy damnhandy commented Feb 20, 2015

This approach worked for my. Setting the SCOOP environment variable to a local path worked as advertised. Scoop is now installing files locally rather on the network drive. We should probably add this to the wiki.

@deevus

This comment has been minimized.

Copy link
Collaborator

@deevus deevus commented Mar 23, 2015

No difficulties reported.

@Zeklandia

This comment has been minimized.

Copy link

@Zeklandia Zeklandia commented May 17, 2017

~~This no longer seems to work :~~

Your solution from issue #427 works:
$env:scoop = 'e:\Develop\scoop'

@lukesampson

This comment has been minimized.

Copy link
Owner

@lukesampson lukesampson commented May 17, 2017

@Zeklandia that only lasts for the duration of the current PowerShell session.

@Zeklandia

This comment has been minimized.

Copy link

@Zeklandia Zeklandia commented Jun 5, 2017

@lukesampson Is that an issue? I was able to use the solution from #427 to install Scoop to a specific folder and it still works out of that folder to this day.

@lukesampson

This comment has been minimized.

Copy link
Owner

@lukesampson lukesampson commented Jun 6, 2017

@Zeklandia If you didn't persist the SCOOP environment variable for your user or machine, Scoop itself might be running from a non-default folder, but apps might still be installing under the default folder, ~/scoop.

Setting $env:SCOOP = C:\some\path is not enough, as far as I know. See my first comment above on how to persist the SCOOP variable.

@Zeklandia

This comment has been minimized.

Copy link

@Zeklandia Zeklandia commented Jun 29, 2017

@lukesampson Strange, because I don't even have a ~/scoop and the apps are visible in the path I defined. Although, whenever scoop tries to update itself (i.e. scoop update) it fails with this error:

At C:\Users\Zeklandia\Apps\scoop\apps\scoop\current\libexec\scoop-update.ps1:69 char:9
+         rm -r -force $currentdir -ea stop
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\Zeklan...s\scoop\current:String) [Remove-Item], ItemNotFoundEx
   ception
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand

C:\Users\Zeklandia\Apps\scoop is where I installed it.

@deepakab03

This comment has been minimized.

Copy link

@deepakab03 deepakab03 commented Mar 27, 2018

It would be good if this is added to the project wiki, as it's quite often that the default install directory HAS to be changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.