Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[log-collector] date: invalid option -- 'v' #1023

Closed
jamison-lahman-ai opened this issue May 24, 2022 · 2 comments
Closed

[log-collector] date: invalid option -- 'v' #1023

jamison-lahman-ai opened this issue May 24, 2022 · 2 comments

Comments

@jamison-lahman-ai
Copy link

Describe the bug
https://github.com/buildkite/elastic-ci-stack-for-aws/blame/master/utils/log-collector#L75

it seems -v-1d is a BSD/OSX syntax and not supported by the GNU data, https://man7.org/linux/man-pages/man1/date.1.html

Steps To Reproduce
Steps to reproduce the behavior:

  1. ./log-collector -s foo -i bar

Expected behavior
Exit code 0

Actual behaviour

++ date -v-1d +%s000
date: invalid option -- 'v'
Try 'date --help' for more information.
+ logAge=

Stack parameters (please complete the following information):

Additional context
date --date="1day" "+%s000" worked for me

$ date --version
date (GNU coreutils) 8.28
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie.
@jradtilbrook
Copy link
Contributor

Oh yep that makes sense. We'll hopefully get to a fix in the next week. Thanks for reporting this @jl-applied 👍

@jeremybumsted
Copy link
Contributor

@jl-applied thanks for reporting this! It should be fixed now, but please let us know if you're running into issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants