Commit 5068b0a
committed
fix: ensure fd monitor file is closed at end of the script run
When running gptscript with providers and --events-stream-to flag, the
file passed to --events-stream-to would be closed after the provider was
setup. This is an error because the file should remain open for the
duration of the script run.
This change will ensure that the file is only closed when the script is
complete.
Additionally, this change introduces 0644 permissions when creating a
file passed to --events-stream-to.
Signed-off-by: Donnie Adams <donnie@acorn.io>1 parent 59bf155 commit 5068b0a
1 file changed
+23
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
47 | | - | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
54 | | - | |
| 56 | + | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
58 | | - | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
| |||
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
77 | 90 | | |
78 | 91 | | |
79 | 92 | | |
80 | 93 | | |
81 | 94 | | |
82 | 95 | | |
| 96 | + | |
83 | 97 | | |
84 | 98 | | |
85 | 99 | | |
| |||
117 | 131 | | |
118 | 132 | | |
119 | 133 | | |
120 | | - | |
121 | | - | |
122 | | - | |
| 134 | + | |
123 | 135 | | |
124 | 136 | | |
125 | 137 | | |
| |||
0 commit comments