Skip to content

Commit ce532d6

Browse files
committed
Fix PSImageReference format
1 parent d22bc9d commit ce532d6

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/Batch/Batch/Batch.format.ps1xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
</TableColumnItems>
6363
</TableRowEntry>
6464
</TableRowEntries>
65-
</TableControl> </View>
65+
</TableControl>
66+
</View>
6667
</ViewDefinitions>
6768
</Configuration>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
namespace Microsoft.Azure.Commands.Batch.Models
2+
{
3+
public partial class PSImageReference
4+
{
5+
public override string ToString()
6+
{
7+
if (string.IsNullOrEmpty(VirtualMachineImageId))
8+
{
9+
return $"{Publisher}:{Offer}:{Sku}:{Version}";
10+
}
11+
else
12+
{
13+
return VirtualMachineImageId;
14+
}
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)