Skip to content

Commit

Permalink
fix(flatpak): use tauri env for flatpak detection
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
  • Loading branch information
89luca89 authored and pascalbreuninger committed Jun 13, 2024
1 parent 589bb54 commit 2e8eec8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
3 changes: 1 addition & 2 deletions desktop/src/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,7 @@ class Client {
public async isCLIInstalled(): Promise<Result<boolean>> {
try {
// we're in a flatpak, we need to check in other paths.
const isflatpak = await this.getEnv("FLATPAK_ID")
if (isflatpak) {
if (import.meta.env.TAURI_IS_FLATPAK === "true") {
const home_dir = await this.getEnv("HOME")
// this will throw if doesn't exist
const exists = await invoke<boolean>("file_exists", {
Expand Down
10 changes: 1 addition & 9 deletions desktop/src/client/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,7 @@ export class Command implements TCommand<ChildProcess> {
return { ...acc, [key]: value }
}, {})

const isflatpak = false
// try {
// // isflatpak = client.getEnv("FLAPTAK_ID")
// } catch {
// isflatpak = false
// }

// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (isflatpak) {
if (import.meta.env.TAURI_IS_FLATPAK === "true") {
this.sidecarCommand = new ShellCommand("run-path-devpod-wrapper", args, {
env: {
...extraEnvVars,
Expand Down

0 comments on commit 2e8eec8

Please sign in to comment.