fleet/cmd/fleetctl
Lucas Manuel Rodriguez f0dbb981a3
Fix small fleetctl query bug when running with --exit flag (#11894)
Bug found while working on #10957.

Can be reproduced in our dogfood environment:
```
fleetctl query --context dogfood --query "SELECT * from osquery_info;" --hosts dogfood-centos-box --exit
⠋ %
```

With the changes in this PR:
```
fleetctl query --context dogfood --query "SELECT * from osquery_info;" --hosts dogfood-centos-box --exit
{"host":"dogfood-centos-box","rows":[{"build_distro":"centos7","build_platform":"linux","config_hash":"e3832343af2f8dc3e5ab62e709c78d3c3ef32b86","config_valid":"1","extensions":"active","host_display_name":"dogfood-centos-box","host_hostname":"dogfood-centos-box","instance_id":"9f0f6433-fbcf-4f15-8f1b-4dedc669ee2d","pid":"2760450","platform_mask":"9","start_time":"1684821735","uuid":"911CBDBA-7B3A-4B96-88F7-B28CECBEF400","version":"5.8.2","watcher":"2760447"}]}
⠦ 0% responded (0% online) | 0/1 targeted hosts (0/1 online) %
```
2023-05-25 08:12:45 -03:00
..
testdata adjust the UI to show a refetching spinner on critical queries (#11868) 2023-05-23 12:43:50 -03:00
api.go New gitops role (#10850) 2023-04-12 16:11:04 -03:00
apply.go Workaround to set policy specs on a team (#9978) 2023-02-22 13:14:53 -03:00
apply_test.go allow to set await_device_configured in DEP profile (#11789) 2023-05-19 07:08:35 -03:00
config.go Add support for custom headers in fleetctl (#6118) 2022-06-07 16:00:09 -04:00
config_test.go Enable errcheck linter for golangci-lint (#8899) 2022-12-05 16:50:49 -06:00
convert.go Move specs parsing functionality to a new pkg/spec package (#7050) 2022-08-05 19:07:32 -03:00
convert_test.go Fix error writing coverage when running tests (#10278) 2023-03-02 17:11:15 -08:00
debug.go fix fleetctl debug commands on Windows (#6186) 2022-06-10 21:59:44 -03:00
debug_test.go Fleet server and tooling to use NETWORK_TEST_GITHUB_TOKEN when environment variable is set. (#9143) 2023-01-03 14:56:11 -03:00
delete.go Move specs parsing functionality to a new pkg/spec package (#7050) 2022-08-05 19:07:32 -03:00
delete_test.go Make activities typed and auto-generate docs for each type (#9069) 2022-12-23 13:05:16 -03:00
flags.go improve messaging of fleetctl debug errors and archive commands (#5590) 2022-05-10 10:44:06 -03:00
fleetctl.go Add fleetctl get mdm-commands command and supporting API endpoint (#11163) 2023-04-17 11:45:16 -04:00
generate.go Add fleetctl get mdm-commands command and supporting API endpoint (#11163) 2023-04-17 11:45:16 -04:00
generate_test.go Finalize MDM commands part 2: implement fleetctl mdm run-command (#10866) 2023-04-03 14:25:49 -04:00
get.go Filter out non-observer_can_run queries for observers in fleetctl get queries command to match the UI. (#11251) 2023-04-26 11:38:20 -03:00
get_test.go Filter out non-observer_can_run queries for observers in fleetctl get queries command to match the UI. (#11251) 2023-04-26 11:38:20 -03:00
goquery.go Use new error handling approach in other packages (#2954) 2021-11-22 09:13:26 -05:00
hosts.go Use new error handling approach in other packages (#2954) 2021-11-22 09:13:26 -05:00
hosts_test.go Implement worker jobs that update/re-assign setup assistants on changes (#11630) 2023-05-15 14:06:09 -04:00
kill_process.go Download and launch orbit for the current device when starting preview (#2437) 2021-10-15 18:23:06 -03:00
kill_process_windows.go Download and launch orbit for the current device when starting preview (#2437) 2021-10-15 18:23:06 -03:00
login.go Tweak output for fleetctl login --help (#4776) 2022-03-23 16:40:16 -04:00
logout.go Use new error handling approach in other packages (#2954) 2021-11-22 09:13:26 -05:00
logout_test.go Simplify fleetctl implementation and improve testing (#3830) 2022-01-24 16:40:51 -03:00
mdm.go Revise validation errors for fleetctl mdm run-command (#11464) 2023-05-03 10:56:25 -05:00
mdm_test.go Improve error handling for fleetctl mdm run-comand (#11588) 2023-05-09 13:43:15 -05:00
package.go Add mTLS support to fleetd (#11319) 2023-04-27 08:44:39 -03:00
package_test.go Add mTLS support to fleetd (#11319) 2023-04-27 08:44:39 -03:00
preview.go Add macos custom profiles support via fleetctl apply (#9824) 2023-02-15 13:01:44 -05:00
preview_test.go Enable errcheck linter for golangci-lint (#8899) 2022-12-05 16:50:49 -06:00
query.go Fix small fleetctl query bug when running with --exit flag (#11894) 2023-05-25 08:12:45 -03:00
query_output.go add host_display_name to live query rows (#8251) 2022-10-17 15:52:25 +02:00
query_test.go Reduce size of DistributedQueryResult to improve live query performance (#11882) 2023-05-25 08:11:53 -03:00
session_test.go Print version warning when using fleetctl (#4139) 2022-02-14 09:43:34 -07:00
setup.go Fleet Premium: de-anonymize usage stats (#7013) 2022-08-03 14:44:34 -04:00
testing_utils.go remove feature flags to enable MDM (#10746) 2023-03-27 16:30:29 -03:00
trigger.go Add fleetctl trigger command (#8877) 2022-12-06 09:56:54 -06:00
trigger_test.go Fix error writing coverage when running tests (#10278) 2023-03-02 17:11:15 -08:00
user.go Create Bulk Users from CSV (#3372) 2022-06-22 13:34:58 -03:00
users_test.go Make activities typed and auto-generate docs for each type (#9069) 2022-12-23 13:05:16 -03:00
vulnerability_data_stream.go Feature 9386: Parse the Mac Office release notes for vulnerability processing (#9993) 2023-02-24 14:18:25 -04:00
vulnerability_data_stream_test.go Feature 9386: Parse the Mac Office release notes for vulnerability processing (#9993) 2023-02-24 14:18:25 -04:00