Exemple #1
0
        protected override async Task <int> HandleCommandAsync()
        {
            var executor = new CompositionExecutor();

            string configFilePath = Path.Combine(Directory.GetCurrentDirectory(), "just-compose.yml");
            var    file           = new FileInfo(configFilePath);

            executor.LoadFromYaml(file);
            executor.OnStatus += Executor_OnStatus;

            if (string.IsNullOrWhiteSpace(CompositionName))
            {
                await executor.ExecuteAsync().ConfigureAwait(false);
            }
            else
            {
                await executor.ExecuteAsync(CompositionName).ConfigureAwait(false);
            }

            return(0);
        }