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

Chalk reporting invalid chalk mark in autocomplete script #251

Open
drraid opened this issue Mar 21, 2024 · 1 comment
Open

Chalk reporting invalid chalk mark in autocomplete script #251

drraid opened this issue Mar 21, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@drraid
Copy link
Contributor

drraid commented Mar 21, 2024

Description

using chalk on linux produces an error about invalid chalk mark in the autocomplete script (the file which chalk itself creates/manages)

another1@covm2:~$ ./chalk
info:  Installed bash auto-completion file to: /home/another1/.local/share/bash_completion/completions/chalk.bash
info:  Added sourcing of autocomplete to ~/.bash_completion file
info:  Script should be sourced automatically on your next login.
another1@covm2:~$ ./chalk
info:  Invalid chalk mark in autocompletion script. Updating.
info:  Installed bash auto-completion file to: /home/another1/.local/share/bash_completion/completions/chalk.bash

Impact

This is mostly an annoyance but could represent a bigger issue.

Steps to Reproduce

See above use of chalk on x64 linux

@miki725 miki725 added the good first issue Good for newcomers label May 28, 2024
@miki725 miki725 added the bug Something isn't working label Jun 20, 2024
@numerical
Copy link

Looks like ARTIFACT_VERSION is missing from the bash autocomplete chalk. autoCompleteFileCheck thus doesn't know what the semver is and just replaces the file on every invocation.

autocomplete magic:

# { "MAGIC" : "dadfedabbadabbed", "CHALK_ID" : "C4TPCR-SSCH-GKJR-V46DGK", "CHALK_VERSION" : "0.3.3", "TIMESTAMP_WHEN_CHALKED" : 1710356599977, "DATETIME_WHEN_CHALKED" : "2024-03-13T15:03:18.901-04:00", "ARTIFACT_TYPE" : "bash", "AUTHOR" : "Miroslav Shubernetskiy <miroslav@miki725.com> 1710352293 -0400", "BRANCH" : "ms", "CHALK_RAND" : "9f75af21a1bf7665", "CODE_OWNERS" : "* @viega\n", "COMMITTER" : "Miroslav Shubernetskiy <miroslav@miki725.com> 1710352893 -0400", "COMMIT_ID" : "5f95367b955256bb92254a5bddaea6e5285a29f6", "COMMIT_MESSAGE" : "build: bumping con4m to include get(dict, \"key\")\n\nits used in connect.c4m", "COMMIT_SIGNED" : true, "DATE_AUTHORED" : "Wed Mar 13 13:51:33 2024 -0400", "DATE_COMMITTED" : "Wed Mar 13 14:01:33 2024 -0400", "HASH" : "a5fc9da9cd3a291f4758e8e19028efeb4ba984dda9e4db7e8762215521767f83", "INJECTOR_COMMIT_ID" : "e96746336a5dd6618d4a8d5eae7a5542d048f301", "ORIGIN_URI" : "git@github.com:crashappsec/chalk.git", "PLATFORM_WHEN_CHALKED" : "GNU/Linux x86_64", "METADATA_ID" : "04CB0D-M6D6-ZP5Q-XN6FHA" }

relevant line in util:

if "ARTIFACT_VERSION" in allChalks[0].extract and

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants