binary-collections 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/submodule +12 -3
  2. package/package.json +1 -1
package/bin/submodule CHANGED
@@ -116,15 +116,24 @@ update_submodule() {
116
116
  }
117
117
 
118
118
  remove_submodule() {
119
- if [[ -z $1 || $1 == "" ]]; then
119
+ if [[ -z $2 || $2 == "" ]]; then
120
120
  echo "input submodule path"
121
121
  read folderpath
122
122
  else
123
- folderpath="$1"
123
+ folderpath="$2"
124
124
  fi
125
125
 
126
+ if [ -z $folderpath ]; then
127
+ echo "Folder path is empty" ;
128
+ exit 1;
129
+ fi
130
+
131
+ echo "removing submodule $folderpath"
132
+
126
133
  # Remove the submodule entry from .git/config
127
- git submodule deinit -f $folderpath
134
+ if [ -d $folderpath ]; then
135
+ git submodule deinit -f $folderpath
136
+ fi
128
137
 
129
138
  # Remove the submodule directory from the superproject's .git/modules directory
130
139
  if [ -d ".git/modules/$folderpath" ]; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "binary-collections",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "binary helper collections by L3n4r0x",
5
5
  "main": "index.js",
6
6
  "files": [