Skip to content

Commit

Permalink
fixed rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
joel5vega committed Jan 19, 2024
1 parent 8c1182a commit 1f4eeb5
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions src/sugar/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ def _call_compose_app(
def _check_config_file(self):
return Path(self.config_file).exists()

<<<<<<< HEAD
# Check if services item is given
def _check_services_item(self):
return bool(self.config.get('services'))
Expand All @@ -142,27 +141,6 @@ def _set_default_group(self):
self.config_group = self.config['groups']['main']
del self.config['services']

=======
#Check if services item is given
def _check_services_item(self):
return bool(self.config.get('services'))
<<<<<<< HEAD

>>>>>>> add flag function to check if service is present
=======

# set default group main
def _set_default_group(self):
#must set the default group
self.config_data["groups"] = {
"main": self.config_data["services"]
}
self.config_group = self.config_data["groups"]["main"]
del self.config_data["services"]

return

>>>>>>> fixed conditional and added constructor
def _filter_service_group(self):
groups = self.config['groups']

Expand Down Expand Up @@ -246,27 +224,6 @@ def _load_compose_app(self):
self.compose_args.append('compose')

def _load_compose_args(self):
<<<<<<< HEAD
self._filter_service_group()
=======
#check if either services or groups are present
if not (self.config.get('services') and self.config.get('groups')):
KxgrLogs.raise_error(
f'either `services` OR `groups` flag must be given',
KxgrErrorType.KXGR_INVALID_CONFIGURATION,
)
#check if both services and groups are present
if self.config.get('services') and self.config.get('groups'):
KxgrLogs.raise_error(
f'`services` and `groups` flag given. Just use one of them is allowed.',
KxgrErrorType.KXGR_INVALID_CONFIGURATION,
)
if self.config.get('services'):
self._set_default_group()
else:
self._filter_service_group()
>>>>>>> fixed conditional and added constructor

if 'env-file' in self.service_group:
self.compose_args.extend(
['--env-file', self.service_group['env-file']]
Expand Down

0 comments on commit 1f4eeb5

Please sign in to comment.