diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-10-12 17:55:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-12 15:55:50 +0000 |
commit | c464cd7073c761780b3170a48542c387560e3f26 (patch) | |
tree | 881a26d05423f9c696c8f35ce8bd2d72d562b1ea /cli/main.rs | |
parent | 5dd010a4fbeb0602891ea537b98216b8ad7d27a7 (diff) |
refactor: FeatureChecker integration in ext/ crates (#20797)
Towards https://github.com/denoland/deno/issues/20779.
Diffstat (limited to 'cli/main.rs')
-rw-r--r-- | cli/main.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cli/main.rs b/cli/main.rs index 1ccd694ee..0817c0984 100644 --- a/cli/main.rs +++ b/cli/main.rs @@ -256,6 +256,19 @@ fn unwrap_or_exit<T>(result: Result<T, AnyError>) -> T { } } +pub(crate) fn unstable_exit_cb(_feature: &str, api_name: &str) { + // TODO(bartlomieju): change to "The `--unstable-{feature}` flag must be provided.". + eprintln!("Unstable API '{api_name}'. The --unstable flag must be provided."); + std::process::exit(70); +} + +#[allow(dead_code)] +pub(crate) fn unstable_warn_cb(feature: &str) { + eprintln!( + "The `--unstable` flag is deprecated, use --unstable-{feature} instead." + ); +} + pub fn main() { setup_panic_hook(); |