open-nomad/command
Mahmood Ali d97927ebcf
cli: Use glint to determine if os.Stdout is tty (#10926)
Use glint to determine if os.Stdout is a terminal.

glint Terminal renderer expects os.Stdout [not only to be a terminal, but also to have non-zero size](b492b545f6/renderer_term.go (L39-L46)). It's unclear how this condition arises, but this additional check causes Nomad to render deployments progress through glint when glint cannot support it.

By using golint to perform the check, we eliminate the risk of mis-judgement.
2021-07-23 11:27:47 -04:00
..
agent Merge pull request #10875 from hashicorp/b-namespace-flag-override 2021-07-14 17:28:36 -04:00
assets command: bump connect examples to v3 2021-01-10 16:54:31 -06:00
raft_tools
test-resources
acl.go
acl_bootstrap.go command: remove -namespace from help options when not applicable 2020-11-19 16:28:39 -05:00
acl_bootstrap_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
acl_policy.go use allow/deny instead of the colored alternatives (#9019) 2020-10-12 08:47:05 -04:00
acl_policy_apply.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
acl_policy_apply_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
acl_policy_delete.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
acl_policy_delete_test.go Event Stream: Track ACL changes, unsubscribe on invalidating changes (#9447) 2020-12-01 11:11:34 -05:00
acl_policy_info.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
acl_policy_info_test.go Event Stream: Track ACL changes, unsubscribe on invalidating changes (#9447) 2020-12-01 11:11:34 -05:00
acl_policy_list.go Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
acl_policy_list_test.go Event Stream: Track ACL changes, unsubscribe on invalidating changes (#9447) 2020-12-01 11:11:34 -05:00
acl_token.go
acl_token_create.go command: remove -namespace from help options when not applicable 2020-11-19 16:28:39 -05:00
acl_token_create_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
acl_token_delete.go command: remove -namespace from help options when not applicable 2020-11-19 16:28:39 -05:00
acl_token_delete_test.go Event Stream: Track ACL changes, unsubscribe on invalidating changes (#9447) 2020-12-01 11:11:34 -05:00
acl_token_info.go command: remove -namespace from help options when not applicable 2020-11-19 16:28:39 -05:00
acl_token_info_test.go Event Stream: Track ACL changes, unsubscribe on invalidating changes (#9447) 2020-12-01 11:11:34 -05:00
acl_token_list.go Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
acl_token_list_test.go Event Stream: Track ACL changes, unsubscribe on invalidating changes (#9447) 2020-12-01 11:11:34 -05:00
acl_token_self.go command: remove -namespace from help options when not applicable 2020-11-19 16:28:39 -05:00
acl_token_self_test.go Event Stream: Track ACL changes, unsubscribe on invalidating changes (#9447) 2020-12-01 11:11:34 -05:00
acl_token_update.go command: remove -namespace from help options when not applicable 2020-11-19 16:28:39 -05:00
acl_token_update_test.go Event Stream: Track ACL changes, unsubscribe on invalidating changes (#9447) 2020-12-01 11:11:34 -05:00
agent_info.go fix agent-info help message formatting (#10747) 2021-06-11 15:39:28 -04:00
agent_info_test.go nomad agent-info: Add json/gotemplate formatting (#9788) 2021-01-13 09:42:46 -05:00
agent_monitor.go Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
agent_monitor_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
alloc.go
alloc_exec.go Refactor alloc exec command (#9718) 2021-01-05 09:33:04 -08:00
alloc_exec_test.go Refactor alloc exec command (#9718) 2021-01-05 09:33:04 -08:00
alloc_exec_unix.go
alloc_exec_windows.go
alloc_fs.go Adds error handling for client error in getRandomJobAlloc. (#10787) 2021-06-18 16:26:43 -04:00
alloc_fs_test.go Events/msgtype cleanup (#9117) 2020-10-19 09:30:15 -04:00
alloc_logs.go cli: add -task flag to alloc signal, restart (#10859) 2021-07-07 09:58:16 -07:00
alloc_logs_test.go Events/msgtype cleanup (#9117) 2020-10-19 09:30:15 -04:00
alloc_restart.go cli: add -task flag to alloc signal, restart (#10859) 2021-07-07 09:58:16 -07:00
alloc_restart_test.go Events/msgtype cleanup (#9117) 2020-10-19 09:30:15 -04:00
alloc_signal.go fix nomad alloc signal help message (#10917) 2021-07-21 11:02:44 -04:00
alloc_signal_test.go Events/msgtype cleanup (#9117) 2020-10-19 09:30:15 -04:00
alloc_status.go command: show number of reserved cores on alloc status output 2021-05-05 08:11:41 -04:00
alloc_status_test.go csi: alloc status -verbose should query volume request 'source' (#9354) 2020-11-16 08:28:52 -05:00
alloc_stop.go Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
alloc_stop_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
check.go command: remove -namespace from help options when not applicable 2020-11-19 16:28:39 -05:00
check_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
commands.go licensing: remove raft storage and sync 2021-04-28 10:28:23 -04:00
commands_oss.go
data_format.go
data_format_test.go
deployment.go
deployment_fail.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
deployment_fail_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
deployment_list.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
deployment_list_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
deployment_pause.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
deployment_pause_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
deployment_promote.go command: give flag-helpers a better name 2020-12-14 10:07:27 -06:00
deployment_promote_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
deployment_resume.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
deployment_resume_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
deployment_status.go cli: Use glint to determine if os.Stdout is tty (#10926) 2021-07-23 11:27:47 -04:00
deployment_status_test.go cli: add monitor flag to deployment status 2021-06-09 16:18:45 -07:00
deployment_unblock.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
deployment_unblock_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
eval.go
eval_status.go bad boolean logic for List-on-Info commands 2021-02-03 21:29:05 +00:00
eval_status_test.go Events/msgtype cleanup (#9117) 2020-10-19 09:30:15 -04:00
event.go Add missing comma in help-text example. 2020-11-02 18:00:53 -05:00
event_test.go Add event sink API and CLI commands (#9226) 2020-11-02 09:57:35 -08:00
helper_devices.go
helper_devices_test.go
helpers.go reuse existing function and typo fix 2021-04-02 11:56:27 -04:00
helpers_test.go tests: update test with a real invalid hcl2 2021-02-01 11:12:22 -05:00
integration_test.go
job.go
job_deployments.go cli: improve wildcard namespace prefix matches (#10648) 2021-05-24 11:38:05 -04:00
job_deployments_test.go Events/msgtype cleanup (#9117) 2020-10-19 09:30:15 -04:00
job_dispatch.go command: give flag-helpers a better name 2020-12-14 10:07:27 -06:00
job_dispatch_test.go Events/msgtype cleanup (#9117) 2020-10-19 09:30:15 -04:00
job_eval.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
job_eval_test.go Events/msgtype cleanup (#9117) 2020-10-19 09:30:15 -04:00
job_history.go cli: improve wildcard namespace prefix matches (#10648) 2021-05-24 11:38:05 -04:00
job_history_test.go Events/msgtype cleanup (#9117) 2020-10-19 09:30:15 -04:00
job_init.bindata_assetfs.go consul: minor CR cleanup 2021-04-05 10:10:16 -06:00
job_init.go
job_init_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
job_inspect.go cli: improve wildcard namespace prefix matches (#10648) 2021-05-24 11:38:05 -04:00
job_inspect_test.go Events/msgtype cleanup (#9117) 2020-10-19 09:30:15 -04:00
job_periodic.go
job_periodic_force.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
job_periodic_force_test.go Events/msgtype cleanup (#9117) 2020-10-19 09:30:15 -04:00
job_plan.go command: give flag-helpers a better name 2020-12-14 10:07:27 -06:00
job_plan_test.go hclv1: tweak HCLv1 tests 2020-10-21 14:05:46 -04:00
job_promote.go cli: improve wildcard namespace prefix matches (#10648) 2021-05-24 11:38:05 -04:00
job_promote_test.go Events/msgtype cleanup (#9117) 2020-10-19 09:30:15 -04:00
job_revert.go cli: improve wildcard namespace prefix matches (#10648) 2021-05-24 11:38:05 -04:00
job_revert_test.go Events/msgtype cleanup (#9117) 2020-10-19 09:30:15 -04:00
job_run.go consul: plubming for specifying consul namespace in job/group 2021-04-05 10:03:19 -06:00
job_run_test.go hclv1: tweak HCLv1 tests 2020-10-21 14:05:46 -04:00
job_scale.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
job_scale_test.go cli: add scale and scaling-events commands to job cmd. 2020-10-06 09:58:46 +02:00
job_scaling_events.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
job_scaling_events_test.go cli: add scale and scaling-events commands to job cmd. 2020-10-06 09:58:46 +02:00
job_status.go cli: improve wildcard namespace prefix matches (#10648) 2021-05-24 11:38:05 -04:00
job_status_test.go testing: prevent panic when job status output changes (#10869) 2021-07-08 09:25:44 -04:00
job_stop.go cli: improve wildcard namespace prefix matches (#10648) 2021-05-24 11:38:05 -04:00
job_stop_test.go Events/msgtype cleanup (#9117) 2020-10-19 09:30:15 -04:00
job_validate.go chore: bump golangci-lint from v1.24 to v1.39 2021-04-03 09:50:23 +02:00
job_validate_test.go hclv1: tweak HCLv1 tests 2020-10-21 14:05:46 -04:00
license.go license: remove "Terminates At" from license get command 2021-04-28 12:00:30 -04:00
license_get.go license: update 'license get' command 2021-04-28 12:00:30 -04:00
license_get_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
meta.go command: remove -namespace from help options when not applicable 2020-11-19 16:28:39 -05:00
meta_test.go
metrics.go Add gocritic to golangci-lint config (#9556) 2020-12-08 12:47:04 -08:00
metrics_test.go Metrics gotemplate support, debug bundle features (#9067) 2020-10-14 15:16:10 -04:00
monitor.go cli: check deployment exists before monitoring (#10757) 2021-06-14 16:42:38 -07:00
monitor_test.go Update monitor func not to take a prefix (#9251) 2020-11-02 10:24:49 -08:00
namespace.go cli: Update namespace helptext guide URL (#10074) 2021-02-23 08:31:19 -08:00
namespace_apply.go command: give flag-helpers a better name 2020-12-14 10:07:27 -06:00
namespace_apply_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
namespace_delete.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
namespace_delete_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
namespace_inspect.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
namespace_inspect_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
namespace_list.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
namespace_list_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
namespace_status.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
namespace_status_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
node.go command: Fix node help error 2020-11-30 11:12:06 -05:00
node_config.go Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
node_config_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
node_drain.go Node Drain Metadata (#10250) 2021-05-07 13:58:40 -04:00
node_drain_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
node_eligibility.go Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
node_eligibility_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
node_status.go Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
node_status_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
operator.go
operator_autopilot.go
operator_autopilot_get.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
operator_autopilot_get_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
operator_autopilot_set.go command: give flag-helpers a better name 2020-12-14 10:07:27 -06:00
operator_autopilot_set_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
operator_autopilot_test.go
operator_debug.go Add remaining pprof profiles to nomad operator debug (#10748) 2021-06-21 14:22:49 -04:00
operator_debug_test.go Add remaining pprof profiles to nomad operator debug (#10748) 2021-06-21 14:22:49 -04:00
operator_keygen.go Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
operator_keygen_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
operator_keyring.go Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
operator_raft.go
operator_raft_info.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
operator_raft_list.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
operator_raft_list_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
operator_raft_logs.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
operator_raft_remove.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
operator_raft_remove_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
operator_raft_state.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
operator_raft_test.go
operator_snapshot.go
operator_snapshot_inspect.go
operator_snapshot_inspect_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
operator_snapshot_restore.go command: remove -namespace from help options when not applicable 2020-11-19 16:28:39 -05:00
operator_snapshot_restore_test.go hclv1: tweak HCLv1 tests 2020-10-21 14:05:46 -04:00
operator_snapshot_save.go command: remove -namespace from help options when not applicable 2020-11-19 16:28:39 -05:00
operator_snapshot_save_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
operator_test.go
plugin.go
plugin_status.go cmd: validate the type flag when querying plugin status. 2021-06-07 13:53:28 +02:00
plugin_status_csi.go
plugin_status_test.go cmd: validate the type flag when querying plugin status. 2021-06-07 13:53:28 +02:00
quota.go
quota_apply.go Port OSS changes for Enterprise Quota accounting (#10481) 2021-04-30 09:48:03 -04:00
quota_apply_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
quota_delete.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
quota_delete_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
quota_init.go Port OSS changes for Enterprise Quota accounting (#10481) 2021-04-30 09:48:03 -04:00
quota_init_test.go cli: filename arg for volume init and quote init 2021-04-18 14:14:05 -04:00
quota_inspect.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
quota_inspect_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
quota_list.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
quota_list_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
quota_status.go cli: Handle nil MemoryMaxMB (#10620) 2021-05-19 16:56:06 -04:00
quota_status_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
recommendation.go cli: add recommendation commands. 2020-11-06 11:16:24 +01:00
recommendation_apply.go Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
recommendation_apply_test.go recs cli: fixed bad composition 2020-11-11 20:52:57 +00:00
recommendation_dismiss.go Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
recommendation_dismiss_test.go recs cli: fixed bad composition 2020-11-11 20:52:57 +00:00
recommendation_info.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
recommendation_info_test.go recs cli: fixed bad composition 2020-11-11 20:52:57 +00:00
recommendation_list.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
recommendation_list_test.go auto-complete for recommendations CLI, plus OSS components of recommendations prefix search 2020-11-11 11:13:43 +00:00
scaling.go cli: add policy list and info to new scaling cmd. 2020-10-05 15:18:30 +02:00
scaling_policy.go cli: ensure scaling policy target doesn't have trailing comma 2020-10-06 12:18:17 +02:00
scaling_policy_info.go scaling policy -verbose flag, plus testing and other recommendations from review 2021-02-04 15:08:13 +00:00
scaling_policy_info_test.go scaling policy -verbose flag, plus testing and other recommendations from review 2021-02-04 15:08:13 +00:00
scaling_policy_list.go scaling policy -verbose flag, plus testing and other recommendations from review 2021-02-04 15:08:13 +00:00
scaling_policy_list_test.go added new policy capabilities for recommendations API 2020-10-28 14:32:16 +00:00
scaling_policy_test.go cli: ensure scaling policy target doesn't have trailing comma 2020-10-06 12:18:17 +02:00
sentinel.go
sentinel_apply.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
sentinel_apply_test.go
sentinel_delete.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
sentinel_delete_test.go
sentinel_list.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
sentinel_list_test.go
sentinel_read.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
sentinel_read_test.go
server.go
server_force_leave.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
server_force_leave_test.go
server_join.go command: remove -namespace from help options when not applicable 2020-11-19 16:28:39 -05:00
server_join_test.go
server_members.go Fix some errcheck errors (#9811) 2021-01-14 12:46:35 -08:00
server_members_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00
status.go Add gosimple linter (#9590) 2020-12-09 11:05:18 -08:00
status_test.go Events/msgtype cleanup (#9117) 2020-10-19 09:30:15 -04:00
system.go
system_gc.go cli: fixed system commands so they correctly use passed flags. 2021-06-28 10:57:50 +02:00
system_gc_test.go cli: fixed system commands so they correctly use passed flags. 2021-06-28 10:57:50 +02:00
system_reconcile.go
system_reconcile_summaries.go cli: fixed system commands so they correctly use passed flags. 2021-06-28 10:57:50 +02:00
system_reconcile_summaries_test.go cli: fixed system commands so they correctly use passed flags. 2021-06-28 10:57:50 +02:00
system_reconcile_test.go
system_test.go
ui.go cli: add help for 'ui -authenticate' flag 2021-04-12 13:56:55 -04:00
util_test.go
version.go
version_test.go
volume.go CSI: CLI for create/delete/list 2021-03-31 16:37:09 -04:00
volume_create.go CSI: CLI for create/delete/list 2021-03-31 16:37:09 -04:00
volume_create_csi.go CSI: CLI for create/delete/list 2021-03-31 16:37:09 -04:00
volume_delete.go Display confirmation message on 'nomad volume delete' and 'nomad volume deregister' 2021-05-24 12:02:55 -04:00
volume_deregister.go Display confirmation message on 'nomad volume delete' and 'nomad volume deregister' 2021-05-24 12:02:55 -04:00
volume_detach.go CSI: remove prefix matching from CSIVolumeByID and fix CLI prefix matching (#10158) 2021-03-18 14:32:40 -04:00
volume_init.go cli: filename arg for volume init and quote init 2021-04-18 14:14:05 -04:00
volume_register.go docs: describe required ACLs for all commands 2020-11-20 13:38:29 -05:00
volume_register_csi.go CSI: correctly handly empty capacity fields during registration 2021-04-02 11:48:26 -04:00
volume_register_test.go CSI: correctly handly empty capacity fields during registration 2021-04-02 11:48:26 -04:00
volume_snapshot_create.go CSI: fix decoding error on snapshot create 2021-04-07 12:00:33 -04:00
volume_snapshot_delete.go CSI: volume snapshot 2021-04-01 11:16:52 -04:00
volume_snapshot_list.go CSI snapshot list: do not shorten snapshot ID 2021-05-27 13:28:18 -04:00
volume_status.go csi: don't truncate CSI volume IDs 2021-03-12 10:39:09 -05:00
volume_status_csi.go csi: fix CLI panic when formatting volume status with -verbose flag (#10818) 2021-06-25 16:17:37 -04:00
volume_status_test.go cli: move tests to use NewMockUi func. 2020-10-05 16:07:41 +02:00