(self)
return str(constants.RESOURCE_PATH / self.CONFIG_PATH)
Returns the configuration argument and optional path to pass to sgrep


        If the config environment variable is set, uses that value verbatim.

        Otherwise, ensures that the default config file exists and uses that location.
Returns the configuration argument and optional path to pass to sgrep
Returns the configuration argument and optional path to pass to sgrep
def config_str(self) -> str:
        """
        Returns the configuration argument and optional path to pass to sgrep


        If the config environment variable is set, uses that value verbatim.

        Otherwise, ensures that the default config file exists and uses that location.
        """
        config_path = self.get_config_path()
        if config_path is None:
            return self.REGISTRY_ROOT + os.environ[self.CONFIG_ENV]

        if not config_path.exists():
            os.makedirs(self.base_path / constants.RESOURCE_PATH, exist_ok=True)
            template = (
                Path(os.path.dirname(__file__)).parent / "configs" / self.CONFIG_PATH
            )
            shutil.copy(template, config_path)
        return str(constants.RESOURCE_PATH / self.CONFIG_PATH)
def config_str ( self ) -> str : config_path = self . get_config_path ( ) if config_path is None : return self . REGISTRY_ROOT + os . environ [ self . CONFIG_ENV ] if not config_path . exists ( ) : os . makedirs ( self . base_path / constants . RESOURCE_PATH , exist_ok = True ) template = ( Path ( os . path . dirname ( __file__ ) ) . parent / "configs" / self . CONFIG_PATH ) shutil . copy ( template , config_path ) return str ( constants . RESOURCE_PATH / self . CONFIG_PATH )