Code Monkey home page Code Monkey logo

berrybrew's People

Contributors

hraharahra avatar hurricup avatar pryrt avatar shawnlaffan avatar stevieb9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

berrybrew's Issues

Crash trying to use config (unhandled exception writing Machine PATH without admin privs)

I get an error trying to call config from a non-admin command prompt. Since manipulating the path probably requires elevated privileges, it probably should always check and warn if not run with correct privileges.

C:\berrybrew\bin>berrybrew.exe config

This is berrybrew, version
1.04

Would you like to add berrybrew to your user PATH? y/n [n]

y

Unhandled Exception: System.UnauthorizedAccessException: Access to the registry key 'HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' is denied.
at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
at Microsoft.Win32.RegistryKey.CreateSubKeyInternal(String subkey, RegistryKeyPermissionCheck permissionCheck, Object registrySecurityObj, RegistryOptions registryOptions)
at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck)
at BerryBrew.Berrybrew.PathSet(List`1 path)
at BerryBrew.Berrybrew.Config()
at BBConsole.bbconsole.Main(String[] args)

Variable-based PATH entries are getting overwritten by static PATH entries on 'config' or 'switch'

When berrybrew edits the PATH during a 'config' or 'switch', it expands any %VARIABLE% in the PATH and writes them back hardcoded.

For example, my original PATH had

...;%VARTHATCHANGES%\bin;...

but after running 'config' or 'switch', it became

...;c:\expanded\version\bin;...

However, I sometimes need to change %VARTHATCHANGES%: with the hardcoded PATH, new instances no longer follow the change in %VARTHATCHANGES%.

My guess is that the C# Environment.GetEnvironmentVariable() is evaluating all the sub-variables inside the PATH when it reads it, and I can understand why that would often be a nice feature. But I don't know if there's a way to override that behavior to get at the raw value of the PATH. (I know that the Windows Scripting Host WScript.Shell's WshEnvironment object does not expand the internal variables when reading a PATH, but I don't know if there's a way to tell the C# interface to not do the internal expansion.

Unfortunately, unless this gets fixed, I won't be able to use berrybrew.

Add 5.24.1 PDL edition

Strawberry perl also has a PDL edition. It would be good if that were listed as well for the 5.24.1 and 5.22.3 versions.

(There are currently 5.24.0 and 5.22.2 PDL editions available, so this will be consistent with the previous releases).

Thanks,
Shawn.

various updates

  • update SYNOPSIS with more recent Perls
  • add unconfig to the main menu and docs

ability to have multi-user perl installations

Would really prefer it if we could remove Administrator requirement entirely

  • root dir in %USERPROFILE%
  • all %PATH% changes in User target
  • need admin privileges to remove Strawberry/ActiveState from Machine PATH

WARNING! orphaned perl installations

After I have downloaded berrybrewand run bin\berrybrew config, I got this message:

WARNING! orphaned perl installations:

  bin

  data

What does it mean? Before the brerrybrew download, I uninstalled the strawberry perl 5.18.0 my labtop had.

"bin\berrybrew.exe config" fails when target folder does not exist

The configuration command throws an error when the target folder does not exist. See error log below.

Creating the folder manually makes things work as expected.

Thanks,
Shawn.

C:\git\berrybrew>bin\berrybrew.exe config

This is berrybrew, version
1.04


Would you like to add berrybrew to PATH? y/n [n]

y

berrybrew was successfully added to PATH, start a new terminal to use it.


Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\berrybrew'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileSystemEnumerableIterator`1.CommonInit()
   at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
   at System.IO.Directory.GetDirectories(String path)
   at BerryBrew.Berrybrew.PerlFindOrphans()
   at BerryBrew.Berrybrew.Finalize()

Unhandled Exception if berrybrew is installed in c:\berrybrew

I installed the zip version of berrybrew on my windows 10 machine. I made the mistake of installing it into c:\berrybrew so I moved it to a different location and removed the setting in the path env var. Well now berrybrew will not run. I keep getting this error.

Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\berrybrew\data\config.json'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
at System.IO.StreamReader..ctor(String path)
at BerryBrew.Berrybrew.JsonParse(String type, Boolean raw)
at BerryBrew.Berrybrew..ctor()
at BBConsole.bbconsole.Main(String[] args)

C:\bin\berrybrew>

I've tried deleting everything and reloading, checked the path variable to make sure it was not set with berrybrew and it still insists on looking for c:\berrybrew\data\config.json

Is there some other file in perhaps the AppData dir?

URL/checksum mismatch issue while installing 5.22.2_32

Attempting to install 5.22.2_32, and encountered the following error:

PS C:berrybrew> berrybrew install 5.22.2_32
Downloading http://strawberryperl.com/download/5.22.2.1/strawberry-perl-5.22.2.1-32bit.zip to C:\berrybrew\installed\temp\strawberry-perl-5.22.2.1-32bit.zip
Confirming checksum ...
Error checksum of downloaded archive
C:\berrybrew\installed\temp\strawberry-perl-5.22.2.1-32bit.zip
does not match expected output
expected: 6c750c56a4eccf3b5f77af56e4cee572c360a1c2
     got: 804a0dff0a3e4a9b3ac37c4495894467cccd35ec
Whould you like berrybrew to delete the corrupted download file? y/n [n]
PS C:\berrybrew> berrybrew install 5.22.2_32
Confirming checksum ...
Error checksum of downloaded archive

When I checked the Strawberry Perl website (http://strawberryperl.com/releases.html), I found both checksums. When I examined the links, I found that the URL for 804a0dff0a3e4a9b3ac37c4495894467cccd35ec checksum referred to the file strawberry-perl-5.22.2.1-32bit.zip, while the 6c750c56a4eccf3b5f77af56e4cee572c360a1c2 checksum referred to the file strawberry-perl-5.22.2.1-32bit-portable.zip. Examining data\perls.json, I found that the section for 5.22.2_32 points to the -32bit.zip file, rather than the -32bit-portable.zip file (as all other _32 sections except those for PDL version).

[
    {
        "name" : "5.22.2_32",
        "file" : "strawberry-perl-5.22.2.1-32bit.zip",
        "url"  : "http://strawberryperl.com/download/5.22.2.1/strawberry-perl-5.22.2.1-32bit.zip",
        "ver"  : "5.22.2",
        "csum" : "6c750c56a4eccf3b5f77af56e4cee572c360a1c2"
    },
]

My instance of Berrybrew was installed from a file downloaded from this site using this link as a .zip file on 2016-10-29, with size of 522,925 bytes, and an sha1sum of d27f906e868c7fd7d320f4149d908248e867e53a.

Also, (possibly a simplistic question, but) is it possible to re-attempt an install without having to re-download the file again (for example, if you downloaded it via a different method)?

Unhandled exception if instance download fails

c:\repos\berrybrew>berrybrew install 5.10.1_32

Downloading http://strawberryperl.com/download/5.10.1.5/strawberry-perl-5.10.1.5-portable.zip to       
C:\berrybrew\temp\strawberry-perl-5.10.1.5-portable.zip

Unhandled Exception: System.Net.WebException: The remote server returned an error: (404) Not Found.
   at System.Net.WebClient.DownloadFile(Uri address, String fileName)
   at BerryBrew.Berrybrew.Fetch(StrawberryPerl perl)
   at BerryBrew.Berrybrew.Install(String version)
   at BBConsole.bbconsole.Main(String[] args)`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.