Comments (4)
Hi folks,
My apologies for taking so long to respond!
This should be fixed by the -Ordered
flag passed to ConvertFrom-Yaml
, as @mstjernfelt mentioned. If it still doesn't work for you, please re-open this issue with a sample yaml.
from powershell-yaml.
Modifying a yaml file without breaking order, formatting, is a huge issue with powershell-yaml. If anyone knows what to do with this - much appreciated!
from powershell-yaml.
It looks to be that even test cases in here does sorting
powershell-yaml/Tests/powershell-yaml.Tests.ps1
Lines 125 to 137 in 03663c6
@gabriel-samfira I can see that you have added those test on db5a680
Do you have ideas what we can do for this? I think that we should modify tests on way that there is data which are not in order, then remove sort commands from them and figure out how to still get expected result.
from powershell-yaml.
I got it to output the same yaml by adding -ordered in the ConvertTo-Yaml
$ymlContent = Get-Content $ymlPath | ConvertFrom-Yaml -Ordered
$ymlContent | ConvertTo-Yaml | Out-File $outPath
from powershell-yaml.
Related Issues (20)
- Add `Test-Yaml` cmdlet
- Class with PSCustomObject ConvertTo-Yaml fail HOT 3
- Copyright is out of date HOT 2
- This Module conflicts with Az.Aks HOT 3
- Fails when used from an Azure Function HOT 4
- an object with property name "keys" HOT 3
- `SerializationOptions` should be defined with `[Flags()]`
- Add `-Ordered` parameter info to documentation HOT 1
- Import-Module error HOT 4
- Yaml output is not respected when exporting Powershell nested classes. HOT 1
- Could not find file '/usr/lib/powershell/ref/System.Private.CoreLib.dll' version 0.4.7 HOT 2
- Convetto-Yaml: Value starting with double quote is being enclosed by single quotes. HOT 5
- mscorlib is not referenced HOT 6
- Cannot find type [YamlDotNet.Core.Parser] HOT 2
- powershell-yaml module is down HOT 1
- Powershell-Yaml incorrectly errors on duplicate key HOT 2
- MethodArgumentConversionInvalidCastArgument HOT 1
- Move add-type to compilation HOT 2
- Found incompatible YAML Document
- Large number being parsed to a scientific notation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from powershell-yaml.