Open
Description
Describe the bug
Not sure if this is a problem with Deno or Moon, but when running a deno command with the watch flag in a local Moon task, when the task is interrupted, the deno command doesn't stop as well
Steps to reproduce
- Create a new moon repo with a deno platform
- Create a moon local task that runs a long running deno script with the watch flag eg.
import {delay} from 'jsr:@std/async'
if (import.meta.main) {
console.log("I'm starting now");
while (true) {
await delay(2000);
console.log(Date.now());
}
}
platform: deno
tasks:
dev:
local: true
env:
OTEL_DENO: "true"
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: "http://observables.rubyquail.design:4318/v1/traces"
OTEL_SERVICE_NAME: criact_dev
script: "deno run --unstable-otel --watch -A main.ts"
- Run the task
moon run root:dev
- interrupt that task, see that the deno script keeps running after the moon task completes
Expected behavior
The deno script would stop
Screenshots
Environment
System:
OS: macOS 15.3.1
CPU: (10) arm64 Apple M1 Max
Memory: 332.16 MB / 32.00 GB
Shell: 3.7.1 - /opt/homebrew/bin/fish
Binaries:
Node: 24.3.0 - ~/.proto/shims/node
Yarn: 1.22.1 - /opt/homebrew/bin/yarn
npm: 10.8.2 - ~/Library/pnpm/npm
pnpm: 10.12.4 - ~/.proto/shims/pnpm
bun: 1.1.30 - /opt/homebrew/bin/bun
Managers:
Cargo: 1.83.0 - ~/.cargo/bin/cargo
Homebrew: 4.5.7 - /opt/homebrew/bin/brew
Maven: 3.9.9 - /opt/homebrew/bin/mvn
pip2: 19.2.3 - /usr/local/bin/pip2
pip3: 22.0.4 - ~/.pyenv/shims/pip3
RubyGems: 3.5.18 - /opt/homebrew/opt/ruby/bin/gem
Utilities:
CMake: 3.30.5 - /opt/homebrew/bin/cmake
Make: 3.81 - /usr/bin/make
GCC: 17.0.0 - /usr/bin/gcc
Git: 2.47.0 - /opt/homebrew/bin/git
Clang: 17.0.0 - /usr/bin/clang
Subversion: 1.14.4 - /opt/homebrew/bin/svn
FFmpeg: 7.1 - /opt/homebrew/bin/ffmpeg
Curl: 8.7.1 - /usr/bin/curl
OpenSSL: 3.4.1 - /opt/homebrew/bin/openssl
Servers:
Apache: 2.4.62 - /usr/sbin/apachectl
Virtualization:
Docker: 27.5.1 - /usr/local/bin/docker
IDEs:
Emacs: 29.4 - /opt/homebrew/bin/emacs
VSCode: 1.101.1 - /opt/homebrew/bin/code
Vim: 9.1 - /usr/bin/vim
Xcode: /undefined - /usr/bin/xcodebuild
Languages:
Bash: 5.2.37 - /opt/homebrew/bin/bash
Java: 23.0.2 - /usr/bin/javac
Perl: 5.34.1 - /usr/bin/perl
Protoc: 29.3 - /opt/homebrew/bin/protoc
Python: 3.9.11 - /Users/rubyquail/.pyenv/shims/python
Python3: 3.9.11 - /Users/rubyquail/.pyenv/shims/python3
Ruby: 3.3.5 - /opt/homebrew/opt/ruby/bin/ruby
Rust: 1.83.0 - /Users/rubyquail/.cargo/bin/rustc
Databases:
SQLite: 3.43.2 - /usr/bin/sqlite3
Browsers:
Chrome: 137.0.7151.120
Safari: 18.3
Safari Technology Preview: 18.4
Additional context
Again sorry if this is a deno issue instead of a moon, one, interrupting just the deno script seems to work fine so I thought it might be moon related