How to stop a PowerShell script on the first error?

$ErrorActionPreference = “Stop” will get you part of the way there (i.e. this works great for cmdlets). However for EXEs you’re going to need to check $LastExitCode yourself after every exe invocation and determine whether that failed or not. Unfortunately I don’t think PowerShell can help here because on Windows, EXEs aren’t terribly consistent on … Read more

Git for Windows: .bashrc or equivalent configuration files for Git Bash shell

Create a .bashrc file under ~/.bashrc and away you go. Similarly for ~/.gitconfig. ~ is usually your C:\Users\<your user name> folder. Typing echo ~ in the Git Bash terminal will tell you what that folder is. If you can’t create the file (e.g. running Windows), run the below command: copy > ~/.bashrc The window will … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)