예제 #1
0
        /// <inheritdoc/>
        public override ExitCode Execute()
        {
            using (var integrationManager = new IntegrationManager(Handler, MachineWide))
                integrationManager.Repair(FeedManager.GetFeed);

            return(ExitCode.OK);
        }
예제 #2
0
    /// <inheritdoc/>
    public override ExitCode Execute()
    {
        CheckInstallBase();

        using var integrationManager = new IntegrationManager(Config, Handler, MachineWide);
        integrationManager.Repair(FeedManager.GetFresh);

        return(ExitCode.OK);
    }
예제 #3
0
    public void Repair()
    {
        var target = new FeedTarget(FeedTest.Test1Uri, new Feed {
            Name = "Test"
        });
        var appEntry = _integrationManager.AddApp(target);

        using var applyFlag = new TemporaryFlagFile("0install-test-flag");
        // Inject access point into AppEntry (without running integration)
        appEntry.AccessPoints = new AccessPointList {
            Entries = { new MockAccessPoint {
                            ApplyFlagPath = applyFlag
                        } }
        };
        _integrationManager.Repair(_ => new Feed());

        applyFlag.Set.Should().BeTrue(because: "Access points should be reapplied");
    }