Skip to content

Commit

Permalink
portlint.tcl: Error if version contains + character
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandesign committed May 12, 2022
1 parent dfa06ba commit 1150427
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/port1.0/portlint.tcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
#
# Copyright (c) 2007 - 2018, 2020 The MacPorts Project
# Copyright (c) 2007 - 2018, 2020, 2022 The MacPorts Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -555,6 +555,13 @@ proc portlint::lint_main {args} {
}
}

if {[info exists version]} {
if {[string first + $version] != -1} {
ui_error "Port version '$version' is invalid. The '+' character is reserved for enabling variants."
incr errors
}
}

if {[info exists platforms]} {
foreach platform $platforms {
if {$platform ni $lint_platforms} {
Expand Down

0 comments on commit 1150427

Please sign in to comment.