Skip to content

Commit ff9099b

Browse files
authored
fix: launch shouldn't expand http uris (#265)
1 parent 2b628b5 commit ff9099b

File tree

20 files changed

+154
-116
lines changed

20 files changed

+154
-116
lines changed

.execs/validate.flow

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ executables:
5050

5151
if [ "$CI" = "true" ]; then
5252
echo "Running golangci-lint with sarif output..."
53-
golangci-lint run ./... --fix --output.sarif.path lint.sarif
53+
golangci-lint run ./... --fix --output.sarif.path lint.sarif --output.text.path stdout
5454
else
5555
golangci-lint run ./... --fix
5656
fi

desktop/src-tauri/src/types/generated/flowfile.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -682,11 +682,6 @@ impl ExecutableExecExecutableType {
682682
#[doc = " \"description\": \"The URI to launch. This can be a file path or a web URL.\","]
683683
#[doc = " \"default\": \"\","]
684684
#[doc = " \"type\": \"string\""]
685-
#[doc = " },"]
686-
#[doc = " \"wait\": {"]
687-
#[doc = " \"description\": \"If set to true, the executable will wait for the launched application to exit before continuing.\","]
688-
#[doc = " \"default\": false,"]
689-
#[doc = " \"type\": \"boolean\""]
690685
#[doc = " }"]
691686
#[doc = " }"]
692687
#[doc = "}"]
@@ -703,9 +698,6 @@ pub struct ExecutableLaunchExecutableType {
703698
pub params: ::std::option::Option<ExecutableParameterList>,
704699
#[doc = "The URI to launch. This can be a file path or a web URL."]
705700
pub uri: ::std::string::String,
706-
#[doc = "If set to true, the executable will wait for the launched application to exit before continuing."]
707-
#[serde(default)]
708-
pub wait: bool,
709701
}
710702
impl ::std::convert::From<&ExecutableLaunchExecutableType> for ExecutableLaunchExecutableType {
711703
fn from(value: &ExecutableLaunchExecutableType) -> Self {
@@ -2831,7 +2823,6 @@ pub mod builder {
28312823
::std::string::String,
28322824
>,
28332825
uri: ::std::result::Result<::std::string::String, ::std::string::String>,
2834-
wait: ::std::result::Result<bool, ::std::string::String>,
28352826
}
28362827
impl ::std::default::Default for ExecutableLaunchExecutableType {
28372828
fn default() -> Self {
@@ -2840,7 +2831,6 @@ pub mod builder {
28402831
args: Ok(Default::default()),
28412832
params: Ok(Default::default()),
28422833
uri: Err("no value supplied for uri".to_string()),
2843-
wait: Ok(Default::default()),
28442834
}
28452835
}
28462836
}
@@ -2885,16 +2875,6 @@ pub mod builder {
28852875
.map_err(|e| format!("error converting supplied value for uri: {}", e));
28862876
self
28872877
}
2888-
pub fn wait<T>(mut self, value: T) -> Self
2889-
where
2890-
T: ::std::convert::TryInto<bool>,
2891-
T::Error: ::std::fmt::Display,
2892-
{
2893-
self.wait = value
2894-
.try_into()
2895-
.map_err(|e| format!("error converting supplied value for wait: {}", e));
2896-
self
2897-
}
28982878
}
28992879
impl ::std::convert::TryFrom<ExecutableLaunchExecutableType>
29002880
for super::ExecutableLaunchExecutableType
@@ -2908,7 +2888,6 @@ pub mod builder {
29082888
args: value.args?,
29092889
params: value.params?,
29102890
uri: value.uri?,
2911-
wait: value.wait?,
29122891
})
29132892
}
29142893
}
@@ -2921,7 +2900,6 @@ pub mod builder {
29212900
args: Ok(value.args),
29222901
params: Ok(value.params),
29232902
uri: Ok(value.uri),
2924-
wait: Ok(value.wait),
29252903
}
29262904
}
29272905
}

desktop/src/pages/Executable/types/ExecutableLaunchDetails.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Badge, Card, Code, Group, Stack, Text, Title } from "@mantine/core";
1+
import { Card, Code, Group, Stack, Text, Title } from "@mantine/core";
22
import { IconExternalLink } from "@tabler/icons-react";
33
import { EnrichedExecutable } from "../../../types/executable";
44

@@ -38,14 +38,6 @@ export function ExecutableLaunchDetails({
3838
</Text>
3939
</div>
4040
)}
41-
{executable.launch?.wait && (
42-
<div>
43-
<Title order={5}>Wait:</Title>
44-
<Badge variant="light" color="blue">
45-
enabled
46-
</Badge>
47-
</div>
48-
)}
4941
</Stack>
5042
</Stack>
5143
</Card>

desktop/src/types/generated/flowfile.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,10 +356,6 @@ export interface ExecutableLaunchExecutableType {
356356
* The URI to launch. This can be a file path or a web URL.
357357
*/
358358
uri: string;
359-
/**
360-
* If set to true, the executable will wait for the launched application to exit before continuing.
361-
*/
362-
wait?: boolean;
363359
[k: string]: unknown;
364360
}
365361
export interface ExecutableParallelExecutableType {

docs/schemas/flowfile_schema.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,6 @@
195195
"description": "The URI to launch. This can be a file path or a web URL.",
196196
"type": "string",
197197
"default": ""
198-
},
199-
"wait": {
200-
"description": "If set to true, the executable will wait for the launched application to exit before continuing.",
201-
"type": "boolean",
202-
"default": false
203198
}
204199
}
205200
},

docs/types/flowfile.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ Launches an application or opens a URI.
172172
| `args` | | [ExecutableArgumentList](#ExecutableArgumentList) | <no value> | |
173173
| `params` | | [ExecutableParameterList](#ExecutableParameterList) | <no value> | |
174174
| `uri` | The URI to launch. This can be a file path or a web URL. | `string` | ||
175-
| `wait` | If set to true, the executable will wait for the launched application to exit before continuing. | `boolean` | false | |
176175

177176
### ExecutableParallelExecutableType
178177

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/flowexec/flow
22

3-
go 1.24
3+
go 1.24.0
44

55
require (
66
github.com/Masterminds/sprig/v3 v3.3.0
@@ -13,7 +13,6 @@ require (
1313
github.com/flowexec/vault v0.1.2
1414
github.com/gen2brain/beeep v0.11.1
1515
github.com/jahvon/glamour v0.8.1-patch3
16-
github.com/jahvon/open-golang v0.0.0-20240522004812-68511c3bc9ef
1716
github.com/mattn/go-runewidth v0.0.16
1817
github.com/onsi/ginkgo/v2 v2.23.4
1918
github.com/onsi/gomega v1.37.0

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,6 @@ github.com/jackmordaunt/icns/v3 v3.0.1 h1:xxot6aNuGrU+lNgxz5I5H0qSeCjNKp8uTXB1j8
117117
github.com/jackmordaunt/icns/v3 v3.0.1/go.mod h1:5sHL59nqTd2ynTnowxB/MDQFhKNqkK8X687uKNygaSQ=
118118
github.com/jahvon/glamour v0.8.1-patch3 h1:LfyMACZavV8yxK4UsPENNQQOqafWuq4ZdLuEAP2ZLE8=
119119
github.com/jahvon/glamour v0.8.1-patch3/go.mod h1:30MVJwG3rcEHrN277NrA4DKzndSL9lBtEmpcfOygwCQ=
120-
github.com/jahvon/open-golang v0.0.0-20240522004812-68511c3bc9ef h1:4PS/MNVT6Rsv15x5Rtwaw971e6kFvNUAf9nvUsZ5hcc=
121-
github.com/jahvon/open-golang v0.0.0-20240522004812-68511c3bc9ef/go.mod h1:dUmuT5CN6osIeLSRtTPJOf0Yz+qAbcyU6omnCzI+ZfQ=
122120
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
123121
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
124122
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=

internal/io/common/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var termEditors = []string{"vim", "nvim", "emacs", "nano"}
1818
func OpenInEditor(path string, stdIn, stdOut *os.File) error {
1919
preferred := os.Getenv("EDITOR")
2020
if preferred != "" && !slices.Contains(termEditors, preferred) {
21-
return open.OpenWith(preferred, path, false)
21+
return open.OpenWith(preferred, path)
2222
}
2323
if preferred == "" {
2424
preferred = "vim"

internal/io/library/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func (l *Library) updateWsPane(msg tea.Msg) (viewport.Model, tea.Cmd) {
123123
break
124124
}
125125

126-
if err := open.Open(curWsCfg.Location(), false); err != nil {
126+
if err := open.Open(curWsCfg.Location()); err != nil {
127127
l.ctx.Logger.Error(err, "unable to open workspace")
128128
l.SetNotice("unable to open workspace", themes.OutputLevelError)
129129
}

0 commit comments

Comments
 (0)