[Craft] [Bug 429299] New: launch Craft by running craftenv.ps1 falls on BadExpression error

Gary Wang bugzilla_noreply at kde.org
Wed Nov 18 12:28:10 GMT 2020


https://bugs.kde.org/show_bug.cgi?id=429299

            Bug ID: 429299
           Summary: launch Craft by running craftenv.ps1 falls on
                    BadExpression error
           Product: Craft
           Version: master
          Platform: Other
                OS: Microsoft Windows
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Core
          Assignee: vonreth at kde.org
          Reporter: wzc782970009 at gmail.com
                CC: kde-windows at kde.org
  Target Milestone: ---

SUMMARY

With clean install of craft, after it successful installed, and running
craftenv.ps1 to get into the Craft shell, it will fall with PowerShell error.

STEPS TO REPRODUCE

1. Install Craft by running `iex ((new-object
net.webclient).DownloadString('https://raw.githubusercontent.com/KDE/craft/master/setup/install_craft.ps1'))`
2. I choosed D:\CraftRoot\ as Craft Root, choosed MinGW as build system, and
leaved other option as their default value.
3. Wait for installation finish.
4. Run `D:\CraftRoot\craft\craftenv.ps1` in the powershell window.
5. See the result.

OBSERVED RESULT

Craft shell won't work, and got the following error:


The expression after '&' in a pipeline element produced an object that was not
valid. It must result in a command name,
 a script block, or a CommandInfo object.
At D:\CraftRoot\craft\craftenv.ps1:130 char:8
+     (& $env:CRAFT_PYTHON ([IO.PATH]::COMBINE("$env:CraftRoot", "bin", ...
+        ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : BadExpression



EXPECTED RESULT

Able to enter a usable Craft shell.

SOFTWARE/OS VERSIONS
Windows: Windows 10 20H2, x64 installation.

ADDITIONAL INFORMATION

As mentioned in the description, the options used for installation is:

1. D:\CraftRoot\ as Craft Root
2. Use MinGW, not MSVC
3. Use colorful log (default)
4. Python is from system, 3.8 is used.

And also, I had tryed remove the CraftRoot folder and reinstall it but still
falls on the same place. I'm not familiar with powershell at all so sorry I
really don't know what's going on. Let me know if you need any additional
information.

btw, an off-topic suggestion, it can be good if there is an offline installer
for the first-time Craft setup, I have a bad internet and I actually tryed
multiple time to re-install Craft but it sometimes falls on cloning the Craft
repo from KDE invent website and all what I can do is delete the whole folder
and start over again. Also if I can install it offline, I can setup a mirror to
fetch binary faster, too.

Thanks.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Kde-windows mailing list