chocolatey / choco-quickstart-scripts

C4B Quick-Start Guide - Supporting Scripts
Apache License 2.0
18 stars 9 forks source link

(fix) ModulesDir blank when invoked as quicklink #277

Closed JPRuskin closed 3 weeks ago

JPRuskin commented 3 weeks ago

Description Of Changes

Fixes a usage of PSScriptRoot in the initializing script.

Motivation and Context

The script was failing to run when it hadn't been run from disk, e.g. when using the irm qsg-go | iex method. This wasn't caught by the tests because we download and run it from disk in those scripts, but we often enjoy using the easier to remember method above.

Testing

  1. Tested on a local Windows Server 2022 VM by running with the raw URL from my branch, rather than the short link.

Operating Systems Testing

Change Types Made

Change Checklist