JanuaryDesk commited on
Commit
4bf380c
1 Parent(s): e235936

try to fix

Browse files
Files changed (1) hide show
  1. app.py +10 -3
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
- subprocess.run("wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh")
11
- subprocess.run("chmod +x ./dotnet-install.sh")
12
- subprocess.run("./dotnet-install.sh --version latest")
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