• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

UiPath / uipathcli / 13244383932

10 Feb 2025 03:26PM UTC coverage: 90.417% (-0.03%) from 90.449%
13244383932

Pull #144

github

thschmitt
Show progress bar for downloading plugin tools

The downloading and packaging progress bars were overlapping during the
initialization of the external plugin. Split up the initialization from
the execution to show a separate progress bar for each operation.
Pull Request #144: Show progress bar for downloading plugin tools

26 of 33 new or added lines in 3 files covered. (78.79%)

1 existing line in 1 file now uncovered.

4991 of 5520 relevant lines covered (90.42%)

1.01 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.68
/plugin/studio/uipcli.go
1
package studio
2

3
import (
4
        "fmt"
5
        "os/exec"
6
        "path/filepath"
7
        "runtime"
8

9
        "github.com/UiPath/uipathcli/log"
10
        "github.com/UiPath/uipathcli/plugin"
11
        "github.com/UiPath/uipathcli/utils/process"
12
)
13

14
const uipcliVersion = "24.12.9111.31003"
15
const uipcliUrl = "https://uipath.pkgs.visualstudio.com/Public.Feeds/_apis/packaging/feeds/1c781268-d43d-45ab-9dfc-0151a1c740b7/nuget/packages/UiPath.CLI/versions/" + uipcliVersion + "/content"
16

17
const uipcliWindowsVersion = "24.12.9111.31003"
18
const uipcliWindowsUrl = "https://uipath.pkgs.visualstudio.com/Public.Feeds/_apis/packaging/feeds/1c781268-d43d-45ab-9dfc-0151a1c740b7/nuget/packages/UiPath.CLI.Windows/versions/" + uipcliWindowsVersion + "/content"
19

20
type uipcli struct {
21
        Exec   process.ExecProcess
22
        Logger log.Logger
23
        path   string
24
}
25

26
func (c *uipcli) Initialize(targetFramework TargetFramework) error {
1✔
27
        name := "uipcli"
1✔
28
        url := uipcliUrl
1✔
29
        if targetFramework == TargetFrameworkWindows {
1✔
NEW
30
                name = "uipcli-win"
×
NEW
31
                url = uipcliWindowsUrl
×
UNCOV
32
        }
×
33
        uipcliPath, err := c.getPath(name, url)
1✔
34
        if err != nil {
1✔
NEW
35
                return err
×
36
        }
×
37
        c.path = uipcliPath
1✔
38
        return nil
1✔
39
}
40

41
func (c uipcli) Execute(args ...string) (process.ExecCmd, error) {
1✔
42
        path := c.path
1✔
43
        if filepath.Ext(path) == ".dll" {
2✔
44
                dotnetPath, err := exec.LookPath("dotnet")
1✔
45
                if err != nil {
1✔
46
                        return nil, fmt.Errorf("Could not find dotnet runtime to run command: %v", err)
×
47
                }
×
48
                path = dotnetPath
1✔
49
                args = append([]string{c.path}, args...)
1✔
50
        }
51

52
        cmd := c.Exec.Command(path, args...)
1✔
53
        return cmd, nil
1✔
54
}
55

56
func (c uipcli) getPath(name string, url string) (string, error) {
1✔
57
        externalPlugin := plugin.NewExternalPlugin(c.Logger)
1✔
58
        executable := "tools/uipcli.dll"
1✔
59
        if c.isWindows() {
1✔
60
                executable = "tools/uipcli.exe"
×
61
        }
×
62
        return externalPlugin.GetTool(name, url, executable)
1✔
63
}
64

65
func (c uipcli) isWindows() bool {
1✔
66
        return runtime.GOOS == "windows"
1✔
67
}
1✔
68

69
func newUipcli(exec process.ExecProcess, logger log.Logger) *uipcli {
1✔
70
        return &uipcli{exec, logger, ""}
1✔
71
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc