Why mkdir error in installing bash-it under Windows7 MSYS

351 views Asked by At

I clone the repo https://github.com/revans/bash-it.git and installed it successfully under linux, but met trouble when I tried to install it under Windows7 MSYS.

In the install.sh:

function load_all() {
  file_type=$1
  [ ! -d "$BASH_IT/$file_type/enabled" ] && mkdir "$BASH_IT/${file_type}/enabled"
  ln -s $BASH_IT/${file_type}/[^_]available/* "${BASH_IT}/${file_type}/enabled"
  }

It returns some errors like this

Would you like to enable all, some, or no aliases? Some of these may make bash s
lower to start up (especially completion). (all/some/none) all
mkdir: cannot create directory `/c/Users/Dan/.bash_it/aliases/enabled': No such
file or directory

It looks the path is correct and quoted, I have run cmd as administrator then run msys.bat, anything else could be wrong?

2

There are 2 answers

1
chepner On

Strictly speaking, it appears mkdir fails because "/c/Users/Dan/.bash_it/aliases" does not exist.

Not knowing anything about MingW, is it possible that BASH_IT should be "c:/Users/Dan/.bash_it" instead?

0
xdan On

I fix it by changing 'mkdir' to 'mkdir -p'