-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange issue when upgrading Deno #255
Comments
Does this also happen if you write this same script in e.g. bash? |
No, the problem seems to be related to Deno.execPath() This works (using Deno.Command behind the scenes, and import { Cron } from "jsr:@hexagon/croner";
import { spawn } from "jsr:@cross/utils";
// Check deno version every fifth second
new Cron("*/10 * * * * *", async () => {
try {
const result = await spawn(["deno","--version"]);
console.log("Success!");
console.log(result);
} catch (e) {
console.error("Failure!");
console.log(e);
}
}); ... but this gives the said error (using import { Cron } from "jsr:@hexagon/croner";
import { spawn } from "jsr:@cross/utils";
// Check deno version every fifth second
new Cron("*/10 * * * * *", async () => {
try {
const result = await spawn([Deno.execPath(),"--version"]);
console.log("Success!");
console.log(result);
} catch (e) {
console.error("Failure!");
console.log(e);
}
}); Could it be that dax uses Edit: Yep, just removing |
Hmm, maybe This is surprising behavior, though, if you're expecting it to find Maybe the fix is as simple as trying the path first, then falling back to execPath if it wasn't found? |
See this example checking deno version each 5th second
After changing deno version while the script is running, e.g.
deno upgrade --version 1.41.2
or similarAnd it does not recover unless restarting the main process
The text was updated successfully, but these errors were encountered: