We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 61bcd1b commit 274ce4aCopy full SHA for 274ce4a
client/version.sh
@@ -4,8 +4,14 @@
4
LERNA_FILE="../lerna.json"
5
6
# Check if lerna.json exists
7
-if [ ! -f "$LERNA_FILE" ]; then
8
- echo "Error: $LERNA_FILE does not exist."
+if [ ! -f "${LERNA_FILE}" ]; then
+ echo "Error: ${LERNA_FILE} does not exist."
9
+ exit 1
10
+fi
11
+
12
+# Check if we have write permissions to the destination directory
13
+if [ ! -w "src/lib" ]; then
14
+ echo "Error: No write permission to src/lib directory."
15
exit 1
16
fi
17
@@ -22,4 +28,4 @@ fi
22
28
echo "{\"version\": \"$VERSION\"}" > src/lib/info.json
23
29
24
30
# Confirm success
25
-echo "info.json created with version: $VERSION"
31
+echo "info.json created with version: $VERSION"
0 commit comments