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

UiPath / uipathcli / 12432844329

20 Dec 2024 02:07PM UTC coverage: 90.385% (-0.005%) from 90.39%
12432844329

push

github

thschmitt
Test on windows

4926 of 5450 relevant lines covered (90.39%)

1.01 hits per line

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

75.0
/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"
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   utils.ExecProcess
22
        Logger log.Logger
23
}
24

25
func (c uipcli) Execute(targetFramework TargetFramework, args ...string) (utils.ExecCmd, error) {
1✔
26
        if targetFramework == TargetFrameworkWindows {
1✔
27
                return c.execute("uipcli-win", uipcliWindowsUrl, args)
×
28
        }
×
29
        return c.execute("uipcli", uipcliUrl, args)
1✔
30
}
31

32
func (c uipcli) execute(name string, url string, args []string) (utils.ExecCmd, error) {
1✔
33
        uipcliPath, err := c.getPath(name, url)
1✔
34
        if err != nil {
1✔
35
                return nil, err
×
36
        }
×
37

38
        path := uipcliPath
1✔
39
        if filepath.Ext(uipcliPath) == ".dll" {
2✔
40
                path, err = exec.LookPath("dotnet")
1✔
41
                if err != nil {
1✔
42
                        return nil, fmt.Errorf("Could not find dotnet runtime to run command: %v", err)
×
43
                }
×
44
                args = append([]string{uipcliPath}, args...)
1✔
45
        }
46

47
        cmd := c.Exec.Command(path, args...)
1✔
48
        return cmd, nil
1✔
49
}
50

51
func (c uipcli) getPath(name string, url string) (string, error) {
1✔
52
        externalPlugin := plugin.NewExternalPlugin(c.Logger)
1✔
53
        executable := "tools/uipcli.dll"
1✔
54
        if c.isWindows() {
1✔
55
                executable = "tools/uipcli.exe"
×
56
        }
×
57
        return externalPlugin.GetTool(name, url, executable)
1✔
58
}
59

60
func (c uipcli) isWindows() bool {
1✔
61
        return runtime.GOOS == "windows"
1✔
62
}
1✔
63

64
func newUipcli(exec utils.ExecProcess, logger log.Logger) *uipcli {
1✔
65
        return &uipcli{exec, logger}
1✔
66
}
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