about summary refs log tree commit diff
path: root/tvix/cli/src/errors.rs
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-01-22T22·28+0300
committertazjin <tazjin@tvl.su>2023-01-27T12·21+0000
commitdfc50c9ef53155a1e2b40d4bb203e43aa06dc428 (patch)
treea179300aeacb8abfe70e3ee0148b2e656cdae621 /tvix/cli/src/errors.rs
parentfdca93d6edc88a5979c536bf26553bdfc1f037b5 (diff)
feat(tvix/cli): add helper for populating drv output configuration r/5766
This threads through the fields that control whether a derivation is a
fixed-output derivation or not.

Change-Id: I49739de178fed9f258291174ca1a2c15a7cf5c2a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7900
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/cli/src/errors.rs')
-rw-r--r--tvix/cli/src/errors.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tvix/cli/src/errors.rs b/tvix/cli/src/errors.rs
index 8eaaef1579aa..cbf8ed94579d 100644
--- a/tvix/cli/src/errors.rs
+++ b/tvix/cli/src/errors.rs
@@ -9,6 +9,7 @@ pub enum Error {
     DuplicateEnvVar(String),
     ShadowedOutput(String),
     InvalidDerivation(DerivationError),
+    InvalidOutputHashMode(String),
 }
 
 impl Display for Error {
@@ -32,6 +33,11 @@ impl Display for Error {
                 "the environment variable '{name}' shadows the name of an output"
             ),
             Error::InvalidDerivation(error) => write!(f, "invalid derivation parameters: {error}"),
+
+            Error::InvalidOutputHashMode(mode) => write!(
+                f,
+                "invalid output hash mode: '{mode}', only 'recursive' and 'flat` are supported"
+            ),
         }
     }
 }