1. mst
  2. ooo340

Commits

Vladimir Glazunov  committed 9cc4bb8

vgbugs10: #162096# initialisation repository is the only active repository when source_config is missing

  • Participants
  • Parent commits 86610b8
  • Branches default

Comments (0)

Files changed (1)

File solenv/bin/modules/SourceConfig.pm

View file
  • Ignore whitespace
     };
     $self->{SOURCE_CONFIG_FILE} = get_config_file($self->{SOURCE_ROOT}) if (!defined $self->{SOURCE_CONFIG_FILE});
     $self->{SOURCE_CONFIG_DEFAULT} = $self->{SOURCE_ROOT} .'/'.SOURCE_CONFIG_FILE_NAME;
+    if (defined $self->{USER_SOURCE_ROOT}) {
+        ${$self->{REPOSITORIES}}{File::Basename::basename($self->{USER_SOURCE_ROOT})} = $self->{USER_SOURCE_ROOT};
+    };
     read_config_file($self);
    	get_module_paths($self);
     bless($self, $class);
 };
 
 #
-# Fallback - default repository is based on the object initialization parameter...
+# Fallback - fallback repository is based on RepositoryHelper educated guess
 #
 sub get_fallback_repository {
     my $self = shift;
 sub read_config_file {
     my $self = shift;
     if (!$self->{SOURCE_CONFIG_FILE}) {
-        get_fallback_repository($self);
+        if (!defined $self->{USER_SOURCE_ROOT}) {
+            get_fallback_repository($self);
+        };
         return;
     };
     my $repository_section = 0;