Spaces:
Running
Running
Commit
Β·
fd8c0e4
1
Parent(s):
aab8343
fixes
Browse files
fix.sh
CHANGED
@@ -1,18 +1,17 @@
|
|
1 |
#!/bin/bash
|
2 |
set -e
|
3 |
|
4 |
-
|
5 |
-
sed -i '/from pyth.plugins.rtf15.reader import Rtf15Reader/d' /home/user/app/app2.py
|
6 |
-
echo "β
Import removed."
|
7 |
|
8 |
-
echo "
|
9 |
|
10 |
-
#
|
11 |
-
|
12 |
-
n
|
13 |
-
a\ processing_status_messages.append(f"β οΈ Skipping RTF file {file.name} because RTF processing is disabled.")\n continue
|
14 |
-
}' /home/user/app/app2.py
|
15 |
|
16 |
-
|
|
|
17 |
|
18 |
-
|
|
|
|
|
|
|
|
1 |
#!/bin/bash
|
2 |
set -e
|
3 |
|
4 |
+
TARGET_FILE="/home/user/app/app2.py"
|
|
|
|
|
5 |
|
6 |
+
echo "π Normalizing indentation in $TARGET_FILE..."
|
7 |
|
8 |
+
# 1. Convert ALL tabs in the entire file into 4 spaces
|
9 |
+
expand --tabs=4 "$TARGET_FILE" > "${TARGET_FILE}.fixed"
|
|
|
|
|
|
|
10 |
|
11 |
+
# 2. Replace original file with fixed version
|
12 |
+
mv "${TARGET_FILE}.fixed" "$TARGET_FILE"
|
13 |
|
14 |
+
# 3. Double check for stray carriage returns (\r), just in case
|
15 |
+
sed -i 's/\r$//' "$TARGET_FILE"
|
16 |
+
|
17 |
+
echo "β
All tabs converted to spaces, indentation clean. Retrying app launch should now succeed."
|