diff options
author | Stefano Mazzucco <stefano@curso.re> | 2020-02-11 20:38:15 +0000 |
---|---|---|
committer | Stefano Mazzucco <stefano@curso.re> | 2020-02-11 20:44:04 +0000 |
commit | 2b4794f941ceb73cad80758fc8f34fa8281aa511 (patch) | |
tree | 18ebe5a69c6c9109f83d1d980fee7937c949d8bf /pkgs/development/tools/aws-sam-cli | |
parent | c6b1ce47b673a35c140e7eec8b7409c645443a6f (diff) |
aws-sam-cli: add argument to conditionally enable telemetry
If someone really wants to opt into telemetry, they can do so by setting `enableTelemetry` to `true` (the default is `false`), in which case the wrapper that sets `SAM_CLI_TELEMETRY` to `0` will not be created. Note that this actually allows a user to optionally disable telemetry from the command line or the (poorly documented) configuration in `~/.aws-sam/metadata.json`. The downside is telemetry will be enabled at least on the first run, causing a unique installation ID to be saved in the configuration file.
Diffstat (limited to 'pkgs/development/tools/aws-sam-cli')
-rw-r--r-- | pkgs/development/tools/aws-sam-cli/default.nix | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkgs/development/tools/aws-sam-cli/default.nix b/pkgs/development/tools/aws-sam-cli/default.nix index 916ff325b43b7..09a61ef564f66 100644 --- a/pkgs/development/tools/aws-sam-cli/default.nix +++ b/pkgs/development/tools/aws-sam-cli/default.nix @@ -1,5 +1,6 @@ { lib , python +, enableTelemetry ? false }: let @@ -83,7 +84,7 @@ buildPythonApplication rec { tomlkit ]; - postFixup = '' + postFixup = if enableTelemetry then "echo aws-sam-cli TELEMETRY IS ENABLED" else '' # Disable telemetry: https://github.com/awslabs/aws-sam-cli/issues/1272 wrapProgram $out/bin/sam --set SAM_CLI_TELEMETRY 0 ''; |