stevieb9 / berrybrew

Perlbrew for Windows!
Other
63 stars 9 forks source link

Options() throws exception if 'file_assoc' value is null in first-run BaseConfig() #237

Closed autarch closed 4 years ago

autarch commented 4 years ago

I started a Win Server 2019 VM in Azure to test out some Windows stuff. I tried installing berrybrew via chocolatey and via the berrybrew installer but in both cases I got the same error whenever I run berrybrew (with any command or with no command):

Unhandled Exception: System.ArgumentNullException: Value cannot be null.                                                Parameter name: value                                                                                                      at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)                                            at Microsoft.Win32.RegistryKey.SetValue(String name, Object value, RegistryValueKind valueKind)                         at BerryBrew.Berrybrew.Options(String option, String value, Boolean quiet)                                              at BerryBrew.Berrybrew.FileAssoc(String action, Boolean quiet)                                                          at BerryBrew.Berrybrew.BaseConfig()                                                                                     at BerryBrew.Berrybrew..ctor()                                                                                          at berrybrew.Bbconsole.Main(String[] args)                 
autarch commented 4 years ago

This is also happening on a Windows 10 VM, so I don't think it's specific to the OS version.

autarch commented 4 years ago

I went back and installed 1.29 and it works fine, so it's a change in the most recent release causing this.

stevieb9 commented 4 years ago

This will be pushed out as an emergency fix. I know exactly why this is happening, and I'm surprised I overlooked it.

Just writing tests to prove it out and should have the emergency fix pushed up within an hour.

I'm then going to focus on writing tests for the exec issue you brought up, and will add proper returns to the OS.

stevieb9 commented 4 years ago

Fixed in v1.31 branch (a8fc4e44a1fa931f77d0ead2f6c4d555e361c7c2), back ported via cherry pick into v1.30 as an emergency release build (e8a1b7f7004ef310ac3466da0c06b059143d4e1f).