cake-build / cake-build/cake

Error: Error getting value from 'CurrentUser' on 'Cake.Core.IO.WindowsRegistry'.

Open
#3,829 1 comment 0 reactions 0 assignees View on GitHub
Bug Help wanted Up-for-grabs
Dominant language
C#
Stars
4.2k
Forks
778
Avg merge
1h 15m
Merged PRs (30d)
19

Description

### Prerequisites

- [X] I have written a descriptive issue title
- [X] I have searched [issues](https://github.com/cake-build/cake/issues) to ensure it has not already been reported

### Cake runner

Cake Frosting

### Cake version

2.1.0.0

### Operating system

Linux

### Operating system architecture

N/A

### CI Server

_No response_

### What are you seeing?

I am logging the Build Context in the Setup, it works on the Windows and fails on the Ubuntu.
```
context.Information(context.ToJson(Formatting.Indented))
```

### What is expected?

Please find the expected Output from Windows, I should get similar in Ubuntu
```
----------------------------------------
Setup
----------------------------------------
Cake Context Start
{
"SharedSettings": {},
"FileSystem": {},
"Environment": {
"WorkingDirectory": "D:/Repos/FleetHub/Build/cake-frosting/CakeBuild/bin/Debug/net5.0",
"ApplicationRoot": "D:/Repos/FleetHub/Build/cake-frosting/CakeBuild/bin/Debug/net5.0",
"Platform": {
"Family": "windows",
"Is64Bit": true
},
"Runtime": {
"BuiltFramework": {
"Identifier": ".NETCoreApp",
"Version": "5.0",
"Profile": "",
"FullName": ".NETCoreApp,Version=v5.0"
},
"Runtime": "coreClr",
"CakeVersion": "2.1.0.0",
"IsCoreClr": true
}
},
"Globber": {},
"Log": {
"Verbosity": "normal"
},
"Arguments": {},
"ProcessRunner": {},
"Registry": {
"CurrentUser": {},
"LocalMachine": {},
"ClassesRoot": {},
"Users": {},
"PerformanceData": {},
"CurrentConfig": {}
},
"Tools": {},
"Data": {},
"Configuration": {}
}
```

### Steps to Reproduce

Log the Build Context in the Setup
```
context.Information(context.ToJson(Formatting.Indented))
```

### Output log

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with Cake.Core.IO.WindowsRegistry and reproduce the Cake Frosting setup serialization on Ubuntu using context.Information(context.ToJson(Formatting.Indented)). Compare the Linux failure with the shown Windows output; done means logging the build context no longer throws when the CurrentUser registry value is read.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.