mirror of
https://github.com/fleetdm/fleet
synced 2026-04-27 00:17:21 +00:00
#27275 and #27274 - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - [x] Added/updated automated tests - [x] Manual QA for all new/changed functionality - For Orbit and Fleet Desktop changes: - [x] Make sure fleetd is compatible with the latest released version of Fleet (see [Must rule](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/fleetd-development-and-release-strategy.md)). - [x] Orbit runs on macOS, Linux and Windows. Check if the orbit feature/bugfix should only apply to one platform (`runtime.GOOS`). - [x] Auto-update manual QA, from released version of component to new version (see [tools/tuf/test](../tools/tuf/test/README.md)). --------- Co-authored-by: Lucas Rodriguez <lucas@fleetdm.com>
24 lines
571 B
Go
24 lines
571 B
Go
package update
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
|
|
"github.com/theupdateframework/go-tuf/client"
|
|
)
|
|
|
|
var defaultOptions = Options{
|
|
RootDirectory: `C:\Program Files\Orbit`,
|
|
ServerURL: DefaultURL,
|
|
RootKeys: defaultRootMetadata,
|
|
LocalStore: client.MemoryLocalStore(),
|
|
InsecureTransport: false,
|
|
Targets: WindowsTargets,
|
|
}
|
|
|
|
func init() {
|
|
// Set root directory to value of ProgramFiles environment variable if not set
|
|
if dir := os.Getenv("ProgramFiles"); dir != "" {
|
|
DefaultOptions.RootDirectory = filepath.Join(dir, "Orbit")
|
|
}
|
|
}
|