question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

build.ps1 not executing

See original GitHub issue

Hi,

I’ve tried to execute build.ps1, following the “Getting started” page (http://cakebuild.net/docs/tutorials/getting-started).

It seems to fail on line 50 of build.ps1. First error being: "Join-Path : cannot bind argument to parameter ‘Path’ because it is null.

Writing $TOOLS_DIR = Join-Path $PS_Script_Root "tools" instead of $TOOLS_DIR = Join-Path $PSScriptRoot "tools" allowed the script to execute.

I don’t know about powershell or cake, but it looks like it is just the underscores missing, right ?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
devleadcommented, Jun 16, 2016

Then we should probably remove that and use this code

if(!$PSScriptRoot){
    $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
}
0reactions
VivienRuizFeicommented, Jun 17, 2016

You are correct, I’m running powershell version 2.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why are my PowerShell scripts not running?
Only individual commands may be run. Set-ExecutionPolicy AllSigned <-- Will allow signed powershell scripts to run.
Read more >
Fix for PowerShell Script cannot be loaded because ...
Open PowerShell Console by selecting “Run as Administrator” (Or Right-click the Start menu and choose “Windows PowerShell (Admin)” from the context menu) and ......
Read more >
Powershell script not working through Task Scheduler
Hi,. I have tested the solution provided by @MotoX80 by creating a batch file and calling the PowerShell script from it. It is...
Read more >
How to solve: Script cannot be loaded because running ...
Script.ps1 Cannot Be Loaded Because Running Scripts Is Disabled on This System ... This error message is caused by the configuration of the...
Read more >
Fix for PowerShell Script Not Digitally Signed - Dr. Caio Moreno
The script will not execute on the system.” To fix it you have to run the command below to run Set-ExecutionPolicy and change...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found