chocolatey/boxstarter

Cannot call Boxstarter cmdlets in Script / upcoming Boxstarter (upcoming version / PR#479)

Closed this issue ยท 4 comments

I think something is not working with the build artifacts from this PR #479 (2.13.13). I cannot call Invoke-Reboot anymore in my script, i get a message saying; Invoke-Reboot must be called from a Boxstarter package.

I tried printing the keys of the $Boxstarter variable just before this line: https://github.com/mwallner/boxstarter/blob/master/Boxstarter.Bootstrapper/Invoke-Reboot.ps1#L35

On (2.13.0) the keys are:

  • Log
  • ProgramFiles86
  • SuppressLogging
  • RebootOk
  • Package
  • StopOnPackageFailure
  • LocalRepo
  • AutoLogedOn
  • NoPassword
  • NugetSources
  • IsRebooting
  • ScriptToCall
  • BaseDir

On (2.13.13) the keys are:

  • IsRebooting
  • NugetSources
  • BaseDir
  • LocalRepo
  • RebootOk
  • Log
  • StopOnPackageFailure
  • SuppressLogging

From looking at the Invoke-Reboot script, the error seems to be because of the missing ScriptToCall property.

Originally posted by @Baune8D in #394 (comment)

this issue is just for tracking/communication! / fix will go into GH-479

Thanks @Baune8D ,- I cannot thank you enough for catching this xD
I borked on the "chocolatey install" call; - not passing the current / Boxstarter environment to the new session where choco.exe will run / that yields in no Boxstarter module being loaded, - and therefore none of the "boxstarter commands" being available when called in a boxstarter package and not from the interactive BoxstarterShell. (fix is WIP)

@mwallner Thank you for spending the time maintaining this repository! I must admit i have been close to ditching Boxstarter a couple of times, as the bugs (especially from the old Chocolatey version) was beginning to be too much of a hassle. This PR really gives me new hope ๐Ÿ˜„ Boxstarter is such an amazing project, keep up the good work!

closing this issue - fix is included in GH-479