i made this:
import { Command } from '@tauri-apps/api/shell'
async openGameDirectory() {
const platform = await getPlatform();
const gameDirectory = "Desktop";
let bin;
let args = [];
switch(platform) {
case "win32":
bin = "start";
args.push("", gameDirectory);
break;
case "darwin":
bin = "open";
args.push("-R", gameDirectory);
break;
default:
throw new Error(`Unsupported platform: ${platform}`);
};
try {
const command = new Command(bin, args);
const result = await command.execute();
console.log(result); // Log the result if needed
} catch (error) {
console.error('Error executing command:', error);
}
};
but i'm getting this error: Error executing command:"program not allowed on the configured shell scope: open"
even though the perms allow all shell scopes: