Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Use --no-use-colors in dbt_hook.py #43

Open
gbonazzoli opened this issue Sep 7, 2021 · 1 comment · May be fixed by #69
Open

Use --no-use-colors in dbt_hook.py #43

gbonazzoli opened this issue Sep 7, 2021 · 1 comment · May be fixed by #69
Labels
API Small changes to the API. Ideal first contributions. good first issue Good for newcomers

Comments

@gbonazzoli
Copy link

My little advice is to to use the switch --no-use-colors in dbt_hook.py

    def run_cli(self, *command):
        """
        Run the dbt cli

        :param command: The dbt command to run
        :type command: str
        """

        dbt_cmd = [self.dbt_bin, "--no-use-colors", *command]

        if self.profiles_dir is not None:
            dbt_cmd.extend(['--profiles-dir', self.profiles_dir])

The log will be cleaner and not full of ANSI escape chars.

dinigo added a commit to dinigo/airflow-dbt that referenced this issue Oct 22, 2021
Also make the command build function more idiomatic by using `append`
to append single commands (flags) and `extend` when we want to append
several.
@dinigo
Copy link

dinigo commented Oct 22, 2021

Hey, I added this option to my PR since I think it's an interesting one

@andrewrjones andrewrjones added API Small changes to the API. Ideal first contributions. good first issue Good for newcomers labels May 27, 2022
@dinigo dinigo linked a pull request Sep 5, 2022 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API Small changes to the API. Ideal first contributions. good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants