Commit Graph

6 Commits (9309115627f0f5c0bc54a1bc9d352aba20d8788c)

Author SHA1 Message Date
Brent Cook fe1b24e666 allow nil assignment to the datastore 2016-05-23 14:56:19 -05:00
Brent Cook e25525b4a7 avoid validating file-based datastore options on assignment
file:/ strings are special with some datastore options, causing them to read a
file rather than emitting the exact string. This causes a couple of problems.

1. the valid? check needs to be special on assignment, since normalization
   really means normalizing the path, not playing with the value as we would do
   for other types

2. there are races or simply out-of-order assignments when running commands
   like 'services -p 80 -R', where the datastore option is assigned before the
   file is actually written.

This is the 'easy' fix of disabling assignment validation (which we didn't have
before anyway) for types that can expect a file:/ prefix.
2016-03-28 23:03:17 -05:00
Brent Cook 44e1fefa2e when normalizing a string type, ensure we have a string first 2016-03-16 06:44:36 -05:00
HD Moore 36daee08c9 Reverts #4989, support for file: is handled in the options again 2015-04-27 16:07:43 -05:00
jvazquez-r7 66d23e3b5e
Delete file: validation on normalization again 2015-04-20 23:52:17 -05:00
James Lee 3a5af3939d
Split all the option classes into their own files 2015-04-20 15:54:40 -05:00