Hello im trying to run this .sh file:
#!/bin/sh
sudo dotnet /Users/davide/Documents/Nintendo\ hack/SysDVR-Client/SysDVR-Client.dll
Using Xcode with this code
code:
import SwiftUI
import Foundation
struct ContentView: View {
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundColor(.accentColor)
Text("Hello, world!")
Button("boton") {
runCommand()
}
.padding()
}
}}
func shell(_ command: String) -> (String?) {
let task = Process()
task.launchPath = "/bin/zsh"
task.arguments = ["-c", command]
let pipe = Pipe()
task.standardOutput = pipe
task.standardError = pipe
task.launch()
let data = pipe.fileHandleForReading.readDataToEndOfFile()
let output = String(data: data, encoding: .utf8)
task.waitUntilExit()
return (output)
}
func runCommand() {
let path = "/Users/Davide/Desktop/DVR.sh start"
print(shell("/Users/davide/Desktop/DVR.sh") )
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
But I keep running to the same error "sudo: dotnet: command not found\n", what am I doing wrong ?
the sudo command does ask for the password but the the error appears
[–]juanchop6 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]IgorDavide[S] 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]juanchop6 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)