On Wed, Mar 10, 2021 at 09:19:50AM +0800, Luan Shengde wrote:
On Tue, Mar 09, 2021 at 07:33:09PM +0800, Li Ping wrote:
[why]
- rpm has no much to do with os_mount.
add a judgment 2. optimize the code style
Signed-off-by: Li Ping 1477412247@qq.com
src/lib/job.cr | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/src/lib/job.cr b/src/lib/job.cr index 0b4bee4..f91e637 100644 --- a/src/lib/job.cr +++ b/src/lib/job.cr @@ -258,23 +258,28 @@ class Job end
def get_pkg_common_dir
- pkg_style = nil
- tmp = nil ["cci-makepkg", "cci-depends", "build-pkg", "rpmbuild-pkg"].each do |item|
pkg_style = @hash[item]?
break if pkg_style
tmp = @hash[item]?
break if tmp
just do a rename? tmp is a little vague. maybe you can use tmp_pkg_style or tmp_style?
ok, i will rename it. Thanks, Ping
for you do assignment at: tmp = @hash[item]? it will be nil if no @hash[item] or with nil value, do not need to assign a nil value at: tmp = nil
end
- return nil unless pkg_style
- return nil unless tmp
i will use the tmp value later. so, i have to define it first.