Spaces:
Runtime error
Runtime error
Commit
·
4bf380c
1
Parent(s):
e235936
try to fix
Browse files
app.py
CHANGED
@@ -3,13 +3,20 @@
|
|
3 |
import subprocess
|
4 |
import os
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
try:
|
7 |
print(subprocess.check_output("dotnet -list-sdk"))
|
8 |
except:
|
9 |
print("Try to install .net dependency")
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
|
14 |
print(subprocess.check_output("dotnet -list-sdk"))
|
15 |
|
|
|
3 |
import subprocess
|
4 |
import os
|
5 |
|
6 |
+
dotnet_check_command = "dotnet -list-sdk"
|
7 |
+
dotnet_install_commands = [
|
8 |
+
"wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh",
|
9 |
+
"chmod +x ./dotnet-install.sh",
|
10 |
+
"./dotnet-install.sh --version latest"
|
11 |
+
]
|
12 |
+
|
13 |
try:
|
14 |
print(subprocess.check_output("dotnet -list-sdk"))
|
15 |
except:
|
16 |
print("Try to install .net dependency")
|
17 |
+
|
18 |
+
for command in dotnet_install_commands:
|
19 |
+
os.system(command)
|
20 |
|
21 |
print(subprocess.check_output("dotnet -list-sdk"))
|
22 |
|